Trying my best for an accurate rename results, please help?
Posted: 22 Jun 2017, 10:42
I don't know if I can trust the strict rename function. I found a movie renamed to a completely different movie that had zero words in common with the real name. I think I had strict mode on. I'm not completely sure anymore how this could've happen or if it was even caused by my script but paranoid as I am I have since tried to use batch scripting to make damn sure this doesn't happen, which is ridiculous since in batch I can't know what the file was renamed to.
btw the code uses %name% and %year% variables that are extrapolations from the original filename
Is this crazy? Is the strict mode supposed to be completely impervious for renaming errors? Is there a filebot script that would allow me to use the renamed (output) filename as a variable to make my paranoid script simpler and more accurate? Any comments or suggestions much appreciated!
btw the code uses %name% and %year% variables that are extrapolations from the original filename
Code: Select all
c:\progra~1\filebot\filebot -rename %1 --q "%name% %year%" --db TheMovieDb --format "{n} ({y}) {director} {genres} r{rating} {vf} {vc} {ac} {imdbid}"
if not exist %1 if exist "%name% (%year%)*tt???????.*" echo renamed "%~n1" accurately! && exit /b
:: if suspicious revert by narrow search
for %%r in ("*%name%*") do c:\progra~1\filebot\filebot -script fn:revert --action move "%%i"
if exist %1 echo rename failed for "%~n1" && exit /b
:: renamed to something totally different, revert all in folder just in case
for %%r in (*) do c:\progra~1\filebot\filebot -script fn:revert --action move "%%i"