Move x amount of files into incremental folders

Advanced Renamer forum
#1 : 30/01-21 23:53
Ricky Boston
Ricky Boston
Posts: 1
Hello, I'm new to this program.
I am searching for a program to move files from one folder to subfolders, but with a maximum amount of files per folder.

I have a folder named "various". Inside this folder I have 788 files total.
I would like to batch move all the files inside the "various" folder into subfolders with a limit of 200 files per folder. The name of the subfolders must be automatically created in increments of the parent folder name "various" + 001, eg. various001, various002, etc.

The end result should look something like this:


If the folder name "various" can't be appended to the subfolders, I'm ok with only the numbering for the subfolders, e.g. 001, 002, 003, etc..

Is this possible with the Advanced Rename application? I tried the Move files batch mode, but could only get it to put all the files in it's own subfolder. Meaning, with 788 files, I also get 788 subfolders.

Thanks in advance for any help with this.

30/01-21 23:53
#2 : 31/01-21 10:59
David Lee
David Lee
Posts: 612
Use a Script method with the following code:

dir = app.parseTags("<DirName>");
item.newPath=item.path + dir + ("00" + (Math.floor(index/N) + 1)).slice(-3) ;

For an introduction to the Script method check out the User Guide:

For a more detailed introduction to JavaScript a good resource is:

31/01-21 10:59 - edited 31/01-21 11:35