Move Files into Folders with Logic

Advanced Renamer forum
#1 : 13/05-22 16:16
Posts: 1
Hi, sorry that I don't know regular expressions, but I am looking to move files into one exisiting folder if they contain a certain text string and to another existing folder if they contain a different text string. Is this possible please? I have read the manual but I don't know how to do it without script.

If file name contains 'firstfolder' move to Folder 1
If file name contains 'secondfolder' move to Folder 2

AB123_firstfolder.jpg to Folder 1
CD123_secondfolder.jpg to Folder 2
CD123_firstfolder.jpg to Folder 1

Folder 1 and Folder 2 are Subfolders of the base folder.


13/05-22 16:16 - edited 13/05-22 16:26
#2 : 15/05-22 11:12
David Lee
David Lee
Posts: 935
You will need to use a Script method to set item.newPath:

if ( = "firstfolder")) item.newPath = item.path + dir;
if ( = "secondfolder")) item.newPath = item.path + dir;

15/05-22 11:12