[REQ] Append selected directory/file names with preset value

Discuss and share scripts and script files...
Post Reply
3QQPcr
Posts: 50
Joined: 01 Feb 2022 04:52

[REQ] Append selected directory/file names with preset value

Post by 3QQPcr »

Would it be possible to create a simple script that would append selected directory names with a preset value?
Some users might benefit from a separate script that behaves the same but for renaming filenames if both target types cannot be combined into a single script.
The script could be executed by clicking a toolbar button, while the preset value could be modified manually before usage.

For example, selecting multiple directories named:
Test_Folder_1
Test_Folder_2
Test_Folder_3

Would be renamed to:
Test_Folder_1-PRESET_VALUE
Test_Folder_2-PRESET_VALUE
Test_Folder_3-PRESET_VALUE

I understand this can be accomplished via existing "Edit Item Names" but this requires a lot of manual input that becomes tedious when trying to apply the same "-PRESET_VALUE" to many different dirnames.
A simple button to append "-PRESET_VALUE" would mitigate a lot of repetitive work and overall increase productivity.
This seems like a relatively simple script but without much experience I'm unsure how to implement this after reading the Scripting Commands>rename Help section.
Any help would be appreciated, thanks in advance.

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: [REQ] Append selected directory/file names with preset value

Post by jupe »

rename , "*-" . input(,, "PRESET_VALUE");

3QQPcr
Posts: 50
Joined: 01 Feb 2022 04:52

Re: [REQ] Append selected directory/file names with preset value

Post by 3QQPcr »

Perfect, thanks!

Post Reply