I would like to be able to select one or more files, and by selecting a user-defined function, have characters added as a prefix:
ThisIsATest.txt >>> P-ThisIsATest.txt
The Rename Special function will do this but I don't see a way to save a given command so it will persist in the context menu.
I thought perhaps a short script assigned to a UDF button; can anyone assist with the script command?
Many thanks!
Batch Rename Special-Saving Command
-
TestMeister
- Posts: 249
- Joined: 04 Feb 2008 20:17
- Location: Win 11 Pro v25H2- 125%
-
highend
- Posts: 14956
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Batch Rename Special-Saving Command
Scripting commands needed:
get
rename
and a foreach loop...
Look in the scripts exchange part of the forum, Stefan, PeterH, myself and a few others have posted dozen of script (snippets), that use these commands for comparable issues.
get
rename
and a foreach loop...
Look in the scripts exchange part of the forum, Stefan, PeterH, myself and a few others have posted dozen of script (snippets), that use these commands for comparable issues.
One of my scripts helped you out? Please donate via Paypal
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: Batch Rename Special-Saving Command
If you have an working rename command, you can add it as User-defined Command (UDC) too.TestMeister wrote:I would like to be able to select one or more files, and by selecting a user-defined function, have characters added as a prefix:
ThisIsATest.txt >>> P-ThisIsATest.txt
The Rename Special function will do this but I don't see a way to save a given command so it will persist in the context menu.
I thought perhaps a short script assigned to a UDF button; can anyone assist with the script command?
Many thanks!
And then you can add even an keyboard shortcut.
.
-
stapelt
- Posts: 1
- Joined: 30 Jul 2012 05:58
Re: Batch Rename Special-Saving Command
Using the Rename Special->RegExp Rename
Code is: ^(.*)$ > PreFix-$1
This is what I use and it works on all the selected items.
Code is: ^(.*)$ > PreFix-$1
This is what I use and it works on all the selected items.
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: Batch Rename Special-Saving Command
FYI: you can shorten that to just:stapelt wrote:Using the Rename Special->RegExp Rename
Code is: ^(.*)$ > PreFix-$1
This is what I use and it works on all the selected items.
Code: Select all
^ > Prefix-
XYplorer Beta Club