Moving files to folders - Bug or Limitation
Hi Folks,
I have a group of files such as:
- "Screenshot 2026-04-16 at 12.33.36.png"
- "Screenshot 2026-04-17 at 16.38.55.png"
I'd like to move them to a folder using the date shown within the file name (not the file created/modified timestamps).
I can setup a method using Replace and Add to generate new file names of:
- "2026-04-16/Screenshot 2026-04-16 at 12.33.36.png"
- "2026-04-17/Screenshot 2026-04-17 at 16.38.55.png"
However, I get an error ":/ is not supported in filenames".
Is this a product limitation or a bug? I'm using MacOS so is the tool incorrectly interpreting \ as a / or does it just not allow the output to split names into folder/names etc?
This is just a simple example, but should hopefully illustrate my issue. I actually want to do this for folder names rather than file names, and have much more complex requirements where I'm reordering parts of folder names and creating a structured folder hierarchy. I don't want to use a script to do this as I might as well have just written a Python app by that point, I'm trying to keep it simple and GUI driven. I can do this in Transnomino but that app only works on files rather than folders, so it's slow with lots of files and the file list gets rather unnecessarily cluttered making it difficult to verify the output path is correct.
Thanks.
I have a group of files such as:
- "Screenshot 2026-04-16 at 12.33.36.png"
- "Screenshot 2026-04-17 at 16.38.55.png"
I'd like to move them to a folder using the date shown within the file name (not the file created/modified timestamps).
I can setup a method using Replace and Add to generate new file names of:
- "2026-04-16/Screenshot 2026-04-16 at 12.33.36.png"
- "2026-04-17/Screenshot 2026-04-17 at 16.38.55.png"
However, I get an error ":/ is not supported in filenames".
Is this a product limitation or a bug? I'm using MacOS so is the tool incorrectly interpreting \ as a / or does it just not allow the output to split names into folder/names etc?
This is just a simple example, but should hopefully illustrate my issue. I actually want to do this for folder names rather than file names, and have much more complex requirements where I'm reordering parts of folder names and creating a structured folder hierarchy. I don't want to use a script to do this as I might as well have just written a Python app by that point, I'm trying to keep it simple and GUI driven. I can do this in Transnomino but that app only works on files rather than folders, so it's slow with lots of files and the file list gets rather unnecessarily cluttered making it difficult to verify the output path is correct.
Thanks.
Hi Richard,
I don't know about MacOS, but you can't create folders that way. It can be done using the MOVE or COPY batch modes, though; in your case the "Output folder:" specification could be
<word:2>-<word:3>-<word:4>\
I say *could* be because there are likely other strings you could use, btw.
As an aside, I have to say, Javascript methods don't have to be all that complicated. The same result can be more universally achieved by using this two-line script:
t = item.newBasename.replace(/.* (\d+-\d+-\d+) .*/, "$1" ) ;
item.newPath = item.path + t ;
It just looks for the first instance of [numbers]-[numbers]-[numbers] and adds that string to the path. Doing it this way means you can use almost any combination of methods to manipulate the filenames; the assignment to a new path-string can happen anywhere in your method list that you'd like it to happen (instead of wherever ARen wants to do it in the MOVE/COPY batch). By changing the regular expression in the replace line you can easily specify what you'd like to be in your path-string. And the MOVE/COPY batch modes don't allow regex in the Output field.
Batch modes: https://www.advancedrenamer.com/user_guide/v4/batchmode
Hope this helps; if not, maybe somebody Mac-aware can be of more assistance.
Best,
DF
I don't know about MacOS, but you can't create folders that way. It can be done using the MOVE or COPY batch modes, though; in your case the "Output folder:" specification could be
<word:2>-<word:3>-<word:4>\
I say *could* be because there are likely other strings you could use, btw.
As an aside, I have to say, Javascript methods don't have to be all that complicated. The same result can be more universally achieved by using this two-line script:
t = item.newBasename.replace(/.* (\d+-\d+-\d+) .*/, "$1" ) ;
item.newPath = item.path + t ;
It just looks for the first instance of [numbers]-[numbers]-[numbers] and adds that string to the path. Doing it this way means you can use almost any combination of methods to manipulate the filenames; the assignment to a new path-string can happen anywhere in your method list that you'd like it to happen (instead of wherever ARen wants to do it in the MOVE/COPY batch). By changing the regular expression in the replace line you can easily specify what you'd like to be in your path-string. And the MOVE/COPY batch modes don't allow regex in the Output field.
Batch modes: https://www.advancedrenamer.com/user_guide/v4/batchmode
Hope this helps; if not, maybe somebody Mac-aware can be of more assistance.
Best,
DF
Reply to #2:
Sorry, a small edit. [EDIT: I screwed this edit up. I'm changing it now to reflect reality. See, I'm really just an AI and I hallucinate like any respectable machine... :) ]
The script can be made more versatile by leaving out the space before (\d+-\d+-\d+)
so the script becomes:
t = item.newBasename.replace(/.*(\d+-\d+-\d+) .*/, "$1" ) ;
item.newPath = item.path + t ;
Cheers, [sorry again!]
DF
Sorry, a small edit. [EDIT: I screwed this edit up. I'm changing it now to reflect reality. See, I'm really just an AI and I hallucinate like any respectable machine... :) ]
The script can be made more versatile by leaving out the space before (\d+-\d+-\d+)
so the script becomes:
t = item.newBasename.replace(/.*(\d+-\d+-\d+) .*/, "$1" ) ;
item.newPath = item.path + t ;
Cheers, [sorry again!]
DF