Page 1 of 1

Re: help rename folder to file

Posted: 14 Aug 2017, 02:51
by rednoah
Yes, that sounds very simple. You can write a custom format for that.

Sounds like you won't even need to match with online databases because you just want the folder name twice. See "Generic Batch Renaming" for details on that.

@see viewtopic.php?f=3&t=2072

Re: help rename folder to file

Posted: 14 Aug 2017, 23:36
by kim
You are looking for a format something like this:

Code: Select all

{file.parentFile.name.replaceFirst(/^(.+(?=.\d{4})).(\d{4}).+/, /$1 ($2)/)/file.parentFile.name}
FYI: this only works if ALL files are named like your e.g.
else you can make your own regex here:
http://regexr.com

Code: Select all

1. Drop files into Original Files
2. Click on the empty New Names component
3. Now that New Names has focus hit F2
4. New Names will instantly filled with File objects (or Episode / Movie objects if xattr metadata has previously been stored)
5. Double Click any item in New Names to apply a new Format Expression
then use my format
press rename = DONE ;)

Re: help rename folder to file

Posted: 15 Aug 2017, 02:01
by rednoah
Yep, follow the instructions and then use this format:

Code: Select all

/path/to/{folder.name}/{folder.name}
Replace /path/to with something that makes sense on your machine. The folder name will be the folder name, and the filename will also be the folder name.