Reinventing the wheel is what I normally try to avoid, so it would be cool if
the sc rename could get another mode
l = list (of items)
The parameter pattern would turn into a |- separated list of items (full paths)
and a 1:1 relationship would be assumed between the parameters itemlist and pattern
All parameters stay the same, no risk of breaking existing scripts...
This would allow mass renaming of files with XYs superb internal preview feature and automatic
increment on collision option and can easily be triggered via WM_COPYDATA from external applications.
sc rename: new mode = l (list)
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
sc rename: new mode = l (list)
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 66256
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
admin
- Site Admin
- Posts: 66256
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: sc rename: new mode = l (list)
Thanks! 
One of my scripts helped you out? Please donate via Paypal
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: sc rename: new mode = l (list)
Sorry Don, but this is not exactly what I meant / was looking for 
Very close, but not exactly the same
It should not display the "Edit Item Names" window by default and add the
items from the parameter "pattern" in there but it should work completely silent
(as the normal rename with all its existing mode does).
The only exception to this silent mode is when the preview parameter is passed
to it (same old behavior as before).
So for example:
or
So effectively removing the displaying of the "Edit Item Names" window would turn it into what I would like to have / use...
Very close, but not exactly the same
It should not display the "Edit Item Names" window by default and add the
items from the parameter "pattern" in there but it should work completely silent
(as the normal rename with all its existing mode does).
The only exception to this silent mode is when the preview parameter is passed
to it (same old behavior as before).
So for example:
Code: Select all
copydata <receiving XY's hwnd>, "::rename 'l', 'R:\1bc.txt|R:\2ef.txt', , 'R:\abc.txt|R:\def.txt';", 1;
Silently rename:
R:\abc.txt -> R:\1bc.txt
R:\def.txt -> R:\2ef.txt
Code: Select all
copydata <receiving XY's hwnd>, "::rename 'l', 'R:\1bc.txt|R:\2ef.txt', 'p', 'R:\abc.txt|R:\def.txt';", 1;
Rename:
R:\abc.txt -> R:\1bc.txt
R:\def.txt -> R:\2ef.txt
but show the preview window before doing so (and let the user confirm if he wants the files to be renamed)
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 66256
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: sc rename: new mode = l (list)
Well, I kind of thought so ... no problem, tomorrow...
FAQ | XY News RSS | XY X
-
admin
- Site Admin
- Posts: 66256
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: sc rename: new mode = l (list)
In your samples you pass the full path in the "pattern" argument. But that's not really necessary, right?
FAQ | XY News RSS | XY X
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: sc rename: new mode = l (list)
Yeah, I guess it's not necessary. The "itemlist" argument already contains the full path version for all files to be renamed
so it should be sufficient that the "pattern" argument consists of only the (new) file / folder names without their path.
so it should be sufficient that the "pattern" argument consists of only the (new) file / folder names without their path.
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club