Page 1 of 1

Renaming file and folder from command line

Posted: 13 Feb 2015, 20:24
by arielreyes001
is it possible to do this from the command line? I am currently using this to rename files from a button in my Directory Opus (file manager) toolbar:
C:\Program Files\FileBot\filebot -rename {F} --format "{n} ({y}) [{vf}]" -non-strict
How can I do the same for the folder that the same file currently resides in. Or even on its own, what's the command so that it only renames a folder, not a file?

I'm thinking this would work:
C:\Program Files\FileBot\filebot -script fn:renall "path/to/movies" -non-strict --db TheMovieDB --def target=folder
However I don't know how to make the "path/to/movies" dynamic. Meaning I want to run this script on the selected folder, or the parent folder of the selected file. Is this possible?
Thanks,
AR

Re: Renaming file and folder from command line

Posted: 21 Feb 2015, 03:08
by rednoah
I think I answered this one before. The answer is yes. But if you need help with 3rd party tools please check with said 3rd party tools for help. :D

Re: Renaming file and folder from command line

Posted: 08 Mar 2015, 03:09
by arielreyes001
Great! What is the command from the command line?

Re: Renaming file and folder from command line

Posted: 08 Mar 2015, 05:33
by rednoah
1.
Move files into new structure, as defined by your format. I recommend using absolute paths but relative paths will work as well and will be resolved against the location of the original file.

Code: Select all

../{n} ({y})/{n} ({y}) [{vf}]
2.
Delete remaining folder. You may want to use the cleaner script for that.



That's how I'd do it. The exact cmdline calls you have to write yourself. ;)

Re: Renaming file and folder from command line

Posted: 10 Mar 2015, 10:26
by arielreyes001
So is it the -rename command?