Page 1 of 1

Favorite tools - rename by cmd

Posted: 01.01.2017, 22:29
by vorkosigan
Hello

What do I make wrong?
I want to rename selected files by adding prefix [x].
When I select one file everything is ok but when multiple files are selected option Separate for each selected item doesn't work or ..:oops: .

FreeCommander XE 2016 Build 734 64-bit donor
Image

vorkosigan

Re: Favorite tools - rename by cmd

Posted: 02.01.2017, 08:49
by joby_toss
If I understand correctly, you're trying to create a toolbar button for multi-rename? Why? There already is one.
Image
Image

You can create a renaming Profile so your task could be accomplished easier.
Image
Image

P.S. it works on single items, also; you can use the option Open first profile on start (in Multi rename dialog) so it's even quicker.

Re: Favorite tools - rename by cmd

Posted: 02.01.2017, 09:54
by afh
Indeed, %ActivSelName% seems to behave strangely...
You can use "/k echo" in your parameter to see how your command is translated by FreeCommander.

Anyway, this worked for me [with "separate for each selected item" checked, and "enclose each selected item with "" not checked]:

Code: Select all

/c for %i in (%ActivSel%) do (rename %ActivSel% "[x]%~ni%~xi")

Re: Favorite tools - rename by cmd

Posted: 02.01.2017, 17:06
by vorkosigan
afh, your code works exactly like I want it to.
THX.

joby_toss - i use this to mark files which were fulfilled, so i want it on simple short-cut :)