I have two folders: X and Y. Each file in X has a matching file in Y. I need to get the episode number from each file in X, find the corresponding file in Y by checking its filename, and then create a new filename using info from both files. After that, I need to rename the file in Y.
Is there any file renaming software that supports scripting for this, or do I need to write my own app in C++/Java/JavaScript? I’m a bit rusty with coding, so I’m looking for the simplest solution.
With Ant Renamer, if you’re willing to put in some manual work, you can rename files based on a list of names. You’d extract the parts of the filenames from folder X and folder Y that you want to combine using Regex or a tool like Notepad++. Then, you create a new list with the results and use Ant Renamer to batch rename the files based on that list. Just make sure the files in folder X and folder Y are in the same order so they match up correctly.
Filenames are not duplicate. Both folders contain files in a fixed naming convention. All I have to do is extract 4 characters from X folder filenames and then loop through the Y folder filenames looking for a match (albeit at a different position in the filename.) To do that I had to take like 500 files from the Y folder and “normalize” their filenames by hand and with Advanced Renamer so processing would be simpler. Fortunately the 1254 files in the X folder were already “normalized”
I will look into Ant Renamer. Cannot say I know jack about regular expressions but it is worth a try. Nice to be thinking algorithmically again.
Nowadays, duplicate finders can do a lot more. You can set specific criteria (like regex) to compare certain parts of filenames in one list with another. For example, if an ID in filenames from Folder X shows up somewhere in filenames from Folder Y, you can find those matches. Once you have the matches, you can use a tool like Notepad++ to tweak the names and create a new list for batch renaming.
Alternatively, you could create hard links for both folders and rename all files so the matching parts or IDs are at the beginning of the filenames. This way, you can experiment without changing the original files or using extra disk space.
I’m not sure if there’s an easier method without coding, since you’re asking for a lot of different things.