2
I'm using this script:
find $convfold -name \*.mkv -o -name \*.avi -o -name \*.mov -o -name \*.wmv -o -name \*.m4p -o -name \*.m4v -o -name \*.mpg -o -name \*.mp2 -o -name \*.mpeg -o -name \*.mpe -o -name \*.mpv -o -name \*.m2v -o -name *.m4v -delete
where $convfold
is a variable for the folder in which I'm deleting the video.
If I remove the -delete
from the code it displays the files it should be deleting but when I have it in the code I get no return errors nor exceptions.
Example:
flynn@Tron:~/FilebotHandbrake/testconverting$ find -name \*.mkv -o -name \*.mp4 -o -name \*.avi
./TV Shows/Mr. Robot/Season 02/Mr. Robot - S02E02 - eps2.0_unm4sk-pt2.tc.mkv
./TV Shows/Mr. Robot/Season 02/Mr. Robot - S02E01 - eps2.0_unm4sk-pt1.tc.mkv
Any help or suggestions would be appreciated.
1I think you should use
find "$convfold" …
in case there is a space in the folder path. It has nothing to do with the problem, still it's a good general practice. – Kamil Maciorowski – 2016-08-30T22:12:41.243Hint: debug
find
commands, not by removing things like-delete
, but by replacing them with-print
. – G-Man Says 'Reinstate Monica' – 2016-08-31T01:36:12.977