wish for multi file renaming: CLI option to specify files from LSV textfile list

Discussion related to "Everything" 1.5 Alpha.
Post Reply
nod5
Posts: 38
Joined: Fri Aug 19, 2016 9:12 pm

wish for multi file renaming: CLI option to specify files from LSV textfile list

Post by nod5 »

We can open the multi file renaming window from CLI with filepaths as separate parameters
-rename [filename1] [filename2] [filename3] [...]

https://www.voidtools.com/support/every ... e_renaming

In the case of many files with long paths this can hit the maximum CLI path length limit in Windows 10.
To work around that add support for loading a list of filepaths from a textfile with linebreak separated values (LSV) or some other suitable separator.
-rename-list [LSV-filename]
void
Developer
Posts: 16446
Joined: Fri Oct 16, 2009 11:31 pm

Re: wish for multi file renaming: CLI option to specify files from LSV textfile list

Post by void »

Everything 1.5 will support instances with -rename

You can call Everything 1.5 with -rename multiple times for the same instance to build a list of filenames:

For example:
Everything.exe -rename file1.txt
Everything.exe -rename file2.txt
Everything.exe -rename file3.txt

This will create a single unnamed rename instance with the 3 specified files.


I have put on my TODO list to add support for -rename-list <list.txt>

Thank you for the suggestion.
therube
Posts: 4883
Joined: Thu Sep 03, 2009 6:48 pm

Re: wish for multi file renaming: CLI option to specify files from LSV textfile list

Post by therube »

Would wildcards work for you?

Code: Select all

Everything.exe  -copyto  C:\WLIB\Mozilla\USERS\FF78_ESR\cache2\entries\*
Something like that loads 26500 files x 86 chars each (2 MB total size).

The maximum command line length for the CreateProcess function is 32767 characters. This limitation comes from the UNICODE_STRING structure.
If you are using the CMD.EXE command processor, then you are also subject to the 8192 character command line length limit imposed by CMD.EXE.
If you are using the ShellExecute/Ex function, then you become subject to the INTERNET_MAX_URL_LENGTH (around 2048) command line length limit imposed by the ShellExecute/Ex functions.
The maximum size of your environment is 32767 characters. The size of the environment includes all the variable names plus all the values.
https://stackoverflow.com/questions/291 ... ngth-limit
void
Developer
Posts: 16446
Joined: Fri Oct 16, 2009 11:31 pm

Re: wish for multi file renaming: CLI option to specify files from LSV textfile list

Post by void »

Please note: wildcard support with -rename was added in Everything 1.5.

I have added -rename-list, -moveto-list and -copyto-list for the next alpha update.
nod5
Posts: 38
Joined: Fri Aug 19, 2016 9:12 pm

Re: wish for multi file renaming: CLI option to specify files from LSV textfile list

Post by nod5 »

@void Thank you

Thanks also therube for making me aware of the wildcard support in v1.5. It wouldn't have helped in a recent case where I ran into CLI path max length trouble, but I'm sure I'll find use for it in some other cases.
void
Developer
Posts: 16446
Joined: Fri Oct 16, 2009 11:31 pm

Re: wish for multi file renaming: CLI option to specify files from LSV textfile list

Post by void »

Everything 1.5.0.1274a adds support for:

-rename-list <filename.txt>
-moveto-list <filename.txt>
-copyto-list <filename.txt>

<filename.txt> should specify a text/plain file. (with UTF-8, UTF-16 or UTF-16-BE encoding)
Please specify a filename on each new line.

Example:
Everything64.exe -rename-list c:\lists\myfilenames.txt
Post Reply