I often need to append some text in front of, and behind filenames.
I found two script lines to do that, and hooked the two commands to the Rht & Lft clicks of a custom toolbar button.
The prob of using script stuff, but barely knowing anything, leads to odd problems, and mistakes hard to troubleshoot.
But customizing XY is so easy and productive, and the forum help is so quick and great, I don't have to be an expert to benefit.
>>Here's my two separate command lines.. 1st one works fine, 2nd one the filename disappears..
$string = input("Enter the text to prefix:"); rename "b", "$string*", "p";
$string = input("Enter the text to append:"); rename "b", "*$string", "p";
Once I know what's wrong, I'll remove the "p" for 'preview' to speed things up. This will be one more great timesaver for me. Thanks!
Help with custom toolbar button rename commands
-
admin
- Site Admin
- Posts: 64915
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Help with custom toolbar button rename commands
The sequence *$ is reserved for dereferencing. Try this way instead:
Code: Select all
$string = input("Enter the text to append:"); rename "b", "*" . $string, "p";FAQ | XY News RSS | XY X
Re: Help with custom toolbar button rename commands
Wow, Thanks for the fast help and tip.. This support is what really is the crown jewel of this software!

XYplorer Beta Club