How to Rename Folders

Advanced Renamer forum
#1 : 13/11-24 18:40
William Peters
Posts: 1
I want to rename 10 folders (with sub folders) to all have the name Sample-xx where xx is a sequence of numbers from 01 to 10. These folders all have subfolders which I do not wish to be renamed.

How do I do this in Advanced Renamer?

The GUI was not as intuitive to use for renaming folders as it is for renaming files. Documentation was WEAK WEAK WEAK really calling for someone with programmer knowledge to do this step.
#2 : 13/11-24 19:47
Delta Foxtrot
Posts: 357
Reply to #1:

Hi William, welcome,

First, I somewhat agree that the documentation could be better; on the other hand you have to take into account the fact that Kim, the program's author, runs a one-person shop and doesn't really have the resources to do intensive documentation. Personally I'd rather have him concentrating on making the program the best that he can. On the other hand, Microsoft's documentation is dense and, to me, almost unreadable–the only reason you can find much on a specific Windows issue is that there are literally millions of people out there using it and sharing their knowledge.

Advanced Renamer is a complex program, so of course it's not the easiest to use. That's why we're here at the forum to help. :)

That said, the renaming process for folders is very similar to files, you just don't have nested files so that adds a little complexity to folder renaming, perhaps.

Anyway, if I understand you correctly, this procedure should do what you want (but ONLY if you are using a version4.x that uses the {if} conditional renaming; not sure when that started but I'd use the latest version if possible):

( before starting make sure the setting "Options / Settings / Renaming / Use zero padding in Inc Nr tags" is CHECKED in ARen)
1. In an new instance of ARen create a New name method and in the New name: field enter
"Sample-<IncNrDir:01>" (without quotes).
2. Drag the top-level folders, the ones containing the other folders you want to rename, into the File list area. In the "Add folder" popup panel specify "Add the folders" and "Add root folders"; click OK.
3. Check the preview column and make sure the names are what you want, then execute the batch.

4. Drag the same (renamed) folders back into the File list area. This time specify to only add subfolders.
5. At the bottom-right of the New name method you created before, click the little "{if}" button. A new popup will appear.
6. Check "Apply condition" and enter the following in the fields:
Field: Path
[2nd field, no title]: "Regular expression"
Pattern: "Sample-\d\d\\$" (without quotes)
Not matching UNCHECKED
7. Click OK.
8. Check that only the subfolders directly in the current "Sample-xx" folders will be renamed. The subfolders below the target level should be grayed out.
9. If good, execute the batch.

EDIT: You may get errors when you run the last batch, but the "errors" should only be folders you didn't want to rename anyway. END EDIT

Yeah, it's not the most intuitive of interfaces, and you really need Regex knowledge to do more than the (admittedly advanced) basics; but it's not that hard to learn, and again, that's why we're here to help. :)

If you want any explanation of what all this does, let me know.

Best regards,
DF

edited: 13/11-24 20:04
#3 : 16/11-24 08:50
Archie Nelson
Posts: 1
Reply to #2:
In Advanced Renamer, use the "New Name" method with the "Counter" option. Set the format to Sample-<Counter:2> for numbering from 01 to 10. Ensure subfolders are not selected for renaming. Then, click Start to apply the changes.
Add Method: https://www.advancedrenamer.com/user_guide/metho d_add https://monkeymartgame.io/


edited: 30/11-24 04:58