Zardoz2293 wrote:Just out of curiosity have you used the example you've provided, your script, with the two folder names I provided to get the desired results (using the "before" and "after")? Just curious. No reason, just curious.
May I thank and congratulate you on your patience

? I've been meddling in this thread while trying to do other stuff simultaneously, which doesn't bode well for the other stuff either.
Best as I can tell, the sting is that I'm going by the UI route to the Batch Rename-mode of the rename-
command, while the renameitem-
function (with apparently only one mode) seems to differ from that. My best guess (ha!) at the moment is that this part of the renameitem-function is causing trouble:
flags
0: [Default] Smart (keep extension unless extension is passed)
1: Rename base (keep extension)
2: Rename extension (keep base)
[1 + 2 = 3: Rename all (base and extension)]
4: Show dialog (Suffix / Overwrite) on name collision.
Notes:
1 and 2 are only applicable if sourceitem is a file, not a folder.
In short, this should be doable with the rename-command, but not with the renameitem-function. As you depend on the return value, that's not good.