Regex Rename files and move to folder - rename panel should be closed

I have this regex that

  1. renames files and then
  2. moves them to a folder named after the filename.

DO 12.2.2
When I click on the Apply-button in the rename panel, in the background I can see the files being renamed,
but not moved to a folder.

For this I need to to use Apply+OK or just OK.

In both cases the rename panel closes then.

Can this be avoided, i.e. is there a trick to keep the rename panel open, similar to other renames?
(without moving files to folder that is)

Thanks

edit:
for this I need to use 'Apply+Close' or just OK.

We can only help if you actually show us what your rename does. :slight_smile:

Hope this will help?

Rename panel:

Presetname: SnagIt-counter
Old name: (Snagit-|capture-)(\d{8}\s\d{6}.\w{3})
New name: -[#]-\2

Am using F2 key to perform :

rename INLINE=single ADVANCED PRESET=Snagit-Counter @nodeselect Rename REGEXP PATTERN "(.+?)-[0-9 -]+.(jpg|png)" TO \1\\\0

=

Your F2 hotkey is running the Rename command twice. The first time it forces the dialog to appear and shows a preset which renames things but does not move them.

When you click Apply in the dialog, it only Applies what is in the dialog. If what is in the dialog does not move anything then clicking Apply in the dialog will not move anything.

The second Rename command is the one which actually moves things, as a second and separate step, and that one is set not to show the dialog. (If you add the ADVANCED argument to the second Rename, like it is there on the first one, then it would show the dialog. But you'd then go through the dialog twice when you pushed F2, which probably isn't what you want.)

You could combine both actions into one action/preset which could then be run from a single command (or loaded from within the dialog itself). Then clicking Apply in the dialog would do both steps at once.

Combining them into a single preset would involve either working out a regex that does both things at once, or using a script to apply one regex after the other.

Many thanks for your explanation Leo. Appreciate your taking the time to make it understandable, even for me.. :wink:
Whilst I understand it, I am afraid combining both actions into a script or new preset, well, that is, let say 'a bridge too far' for me, at present.
Anyway, thanks again.

=

Script to perform multiple Regular Expressions probably has most of what you need.

Ah, thanks! I'll check it out.