Filter for adding folders 2022

Advanced Renamer forum
#1 : 07/12-22 16:33
Paul Panther
Paul Panther
Posts: 7
Hi. Any news to this?
https://www.advancedrenamer.com/forum_thread?for um_id=5376

I have a ton of folders, which all of them contain a subfolder called previews. Or is there a different way to filter the folder "previews" in the add folders method? Filtering by file extensions or name is not possible here.

Folder1
- sub1
- previews

Folder2
- sub xyz
- previews


07/12-22 16:33
#2 : 08/12-22 12:27
David Lee
David Lee
Posts: 1125
I assume that you want to load the files in the "previews" folders.

Another option is to load ALL the folders but only rename files contained in "previews".

You can do this using an if statement in a script.

app.parseTags("<DirName:2>") will return the name of the folder containing the filename currently being processed.



08/12-22 12:27
#3 : 09/12-22 11:53
Paul Panther
Paul Panther
Posts: 7
Reply to #2:
"I assume that you want to load the files in the "previews" folders."
Yes

"You can do this using an if statement in a script."
Can you explain this in more detail?

Situation:

New Name
<DirName:3> <DirName:2> <DirName:1> <Inc NrDir:01>

<DirName:1> = previews



09/12-22 11:53
#4 : 09/12-22 16:52
David Lee
David Lee
Posts: 1125
Reply to #3:

Try:

if (app.parseTags("<DirName>") == "Previews") return app.parseTags("<DirName:3> <DirName:2> <DirName:1> <Inc NrDir:01>");


09/12-22 16:52