<div dir="ltr">Aaron,<div><br></div><div>Thanks for the tip. However, </div><div><br></div><div>find /media/plex -name "Robin Hood (1973 Movie) [x264-AAC]*"<br></div><div><br></div><div>Does not find anything. Returns nothing on the command line. No errors, it just does not match anything.</div><div><br></div><div>Mark</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 15, 2017 at 4:08 AM, Aaron Jones <span dir="ltr"><<a href="mailto:retro64xyz@gmail.com" target="_blank">retro64xyz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>Im just laying in bed, but try double quotes instead of singles and then paste me the exact error if you get one. </div><div><div class="h5"><div><br>On Oct 14, 2017, at 10:15 PM, Mark Phillips <<a href="mailto:mark@phillipsmarketing.biz" target="_blank">mark@phillipsmarketing.biz</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">I found a few (~120) .mkv files crept into my plex movie drive. Plex on my limited plex server has trouble transcoding these files in real time, so I need to transcode them into mp4s ahead of time. <div><br></div><div>I tried this script, but I have an problem with the second find command.</div><div><br></div><div><div><font face="monospace, monospace">find /media/plex/ -name '*.mkv' | while read line; do</font></div><div><font face="monospace, monospace"> echo "Processing file '$line'"</font></div><div><font face="monospace, monospace"> f=`basename "$line" .mkv`</font></div><div><font face="monospace, monospace"> echo "basename = $f"</font></div><div><font face="monospace, monospace"> if [ -n "$(find /media/plex/ -name '$f.mp4' )" ]; then</font></div><div><font face="monospace, monospace"> #ffmpeg -i {} -vcodec copy -acodec copy $f.mp4 > fix2-mkv.txt 2>&1</font></div><div><font face="monospace, monospace"> #echo {} > files_fixed.txt 2>$1</font></div><div><font face="monospace, monospace"> echo "**************need to convert $line"</font></div><div><font face="monospace, monospace"> else</font></div><div><font face="monospace, monospace"> echo "$f.mp4 already exists"</font></div><div><font face="monospace, monospace"> fi</font></div><div><font face="monospace, monospace">done</font></div></div><div><br></div><div>All of the file names contain special characters, eg '[', and others. </div><div><br></div><div>For example,</div><div>/media/plex/Movies/Disney (Classic)/Robin Hood (1973 Movie) [x264-AAC][DVD][C-W].mkv<br></div><div><br></div><div>I get a false negative on this file when I search for the corresponding mp4 file because of the '[' in the file name. </div><div><br></div><div>This works:</div><div><div><font face="monospace, monospace">find /media/plex -name 'Robin Hood (1973 Movie)*'</font></div><div><font face="monospace, monospace">/media/plex/Movies/Disney (Classic)/Robin Hood (1973 Movie) [x264-AAC][DVD][C-W].mkv</font></div></div><div><br></div><div>but this gives a false negative</div><div><div><font face="monospace, monospace">find /media/plex -name 'Robin Hood (1973 Movie) [x264-AAC]*'</font></div><div><font face="monospace, monospace">root@orca:/home/mark# </font></div></div><div><br></div><div>I searched the find man page for ways to handle the special characters, but no luck on finding a solution. Anyone have a suggestion?</div><div><br></div><div>Thanks!</div><div><br></div><div>Mark</div></div>
</div></blockquote></div></div><blockquote type="cite"><div><span>------------------------------<wbr>---------------------</span><br><span>PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.<wbr>org</a></span><br><span>To subscribe, unsubscribe, or to change your mail settings:</span><br><span><a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/<wbr>mailman/listinfo/plug-discuss</a></span></div></blockquote></div><br>------------------------------<wbr>---------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.<wbr>org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/<wbr>mailman/listinfo/plug-discuss</a><br></blockquote></div><br></div>