Everything Multi-File Renaming with Free Commander

General discussion related to "Everything".
Post Reply
void
Developer
Posts: 16743
Joined: Fri Oct 16, 2009 11:31 pm

Everything Multi-File Renaming with Free Commander

Post by void »

To show the Everything multi-file renamer from a favorite toolbar in Free Commander:

Free Commander creates a tmp file with the list of filenames, we need to pass this list of filenames to Everything.exe:

Create a batch file er.bat in the same location as your Everything.exe (eg: C:\Program Files\Everything)
Set the batch file contents to:

Code: Select all

@echo off
Setlocal EnableDelayedExpansion
set filenames=
for /f "usebackq tokens=*" %%A in ("%1") do (
  set filenames=!filenames! "%%A"
)
rem echo %filenames%
"Everything.exe" -rename %filenames%
 
  • In FreeCommander, from the Tools menu, under Favorites Tools, click Favorite Tools Edit.
  • Click the Add new toolbar button
  • Type in a name (eg: Everything) and click OK.
  • Click the Add new item button.
  • Change Program or folder to: C:\Program Files\Everything\er.bat
  • Change Start folder to: C:\Program Files\Everything
  • Change Parameter to: %ActivSelAsFile%
  • Click OK.



Note: Windows cmd has a limit of 8192 characters.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything Multi-File Renaming with Free Commander

Post by therube »

(Earlier thread for reference: [Everything] Rename - Standalone.)



(Oh, so the board automatically constrains the size of attached images.
Didn't realize.
Though it is not apparent that the image could also be opened in full size.)
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Everything Multi-File Renaming with Free Commander

Post by NotNull »

You could simplify the code by using %ActivSelAsDrag&Drop% (instead of %ActivSelAsFile%), combined with Enclose each selected item with " enabled, to get rid of the quoting of filenames and gluing the together.
(The Enclose each selected item with " option does not work as expected, but Everything can handle that).

With that, the new er.bat would become:

Code: Select all

@start "" everything.exe -rename %*

I posted this on the Free Commander forum, but I think that forum is a "ghost town": no sign of life over there ...
If this get fixed (if ...), you could run everything. exe directly, without the batchfile.
And that would eliminate the 8192 length restriction! (I think ...)
Post Reply