synology cli shell script - video files only - ignore images???
Posted: 09 Sep 2019, 03:59
Greetings.
Big fan and I've had a yearly sub for a few years now and finally pulled the trigger on the lifetime!
I've just started using the CLI for my Synology NAS after learning it was also available there (wish I would have looked YEARS AGO!!! haha)... been using the Windows UI for a while.
But is there a way in the Synology CLI to only rename video files and ignore image files?
Ideally, I just want the rename to occur on vidz so I don't end up with abandoned image files from whatever scraper/app/media server that will create them when the file name doesn't match (i.e. Plex or Emby). Its easier to clean up the non-renamed files when they are different. Yeah... I know... splitting hairs at this point.
If I could just rename the video files, I'd be happy.
Yes, I can script a 'find . -name ' regex this ... or a 'for i in *.blah'... whatever and pass results (which I will do for my shell script -which would be much better anyway since I could handle the images and remove them so the server can just re-fetch new ones), but is there a switch I am missing to simplify this for one off CLI runs?
OH, and while I am asking.. same thing for .nfo files and subs? Maybe a global -video-files-only switch???? I guy can dream, right? haha
Thanks in advance!
j
Big fan and I've had a yearly sub for a few years now and finally pulled the trigger on the lifetime!

I've just started using the CLI for my Synology NAS after learning it was also available there (wish I would have looked YEARS AGO!!! haha)... been using the Windows UI for a while.
But is there a way in the Synology CLI to only rename video files and ignore image files?
Ideally, I just want the rename to occur on vidz so I don't end up with abandoned image files from whatever scraper/app/media server that will create them when the file name doesn't match (i.e. Plex or Emby). Its easier to clean up the non-renamed files when they are different. Yeah... I know... splitting hairs at this point.

If I could just rename the video files, I'd be happy.
Yes, I can script a 'find . -name ' regex this ... or a 'for i in *.blah'... whatever and pass results (which I will do for my shell script -which would be much better anyway since I could handle the images and remove them so the server can just re-fetch new ones), but is there a switch I am missing to simplify this for one off CLI runs?
OH, and while I am asking.. same thing for .nfo files and subs? Maybe a global -video-files-only switch???? I guy can dream, right? haha
Thanks in advance!
j