Help with File Naming Strategy using Substitution Parameters
#1
For the longest time, I've been bulk renaming downloaded iPlayer files to get rid of underscores; and remove the series name (they get sent to a series-specific folder by PVR), and PID/version information. It requires multiple passes with the Thunar bulk facility (on Linux) and is tedious in the extreme.

I started to look at automating the process, and using scripts, but I've just come across the --file-prefix option and now I'm like a kid in a candy shop!

I now have the following preferences set up:

Code:
whitespace 1
fileprefix <00seriesnum.><00episodenum.><episodeshort>
subdir 1
subdirformat <nameshort>

This solves all of my issues with naming series, but leaves an oddity with single programmes.

My episodes all end up nicely matching my old laborious naming convention:

Code:
Hey Duggee\03.01.The Being Quiet Badge.mp4

but singletons are a little weird:

Code:
They Shall Not Grow Old\.mp4

What I'd really like to do is have the <nameshort> applied to the filename when there's no series or episode information.

It's not the end of the world, and freeing myself from Thunar is worth the small inconvenience, but does anyone have any suggestion about a convention which would satisfy both of the above scenario?

Thanks.
#2
You would have to script that sort of logic via --command
#3
Thanks, after a bit of experimentation, I've gone with the following and it works great!

Code:
commandtv if [ "<fileprefix>" = "" ]; then mv -T "<filename>" "<dir>/<nameshort>.<ext>"; fi
#4
Thanks Dave

I'll add that to my useful GIP functions.


Possibly Related Threads...
Thread Author Replies Views Last Post
  How do I omit separator in file prefix if "episode" substitution parameter is empty? garcia 2 2,369 22-08-2017, 05:30 PM
Last Post: garcia