Hello. I wish to have the following steps done to help me rename files/folders in a specific way:
Example text from clipboard to be fetched: This is a Christmas gift
Output I wanted when renaming a file/folder: 20230210_This_is_a_Christmas_gift
-where the date is the date today
-where all spaces are converted to underscores "_"
-where the text case is not affected
-where the spaces at the end of the clipboard (assuming the text in the clipboard has extra spaces after the word "gift") are removed
Thank you!
PS: does this fall under 'Rename' or 'Run Script'?
script request to quickly rename file with date
Re: script request to quickly rename file with date
renameitem(formatdate(, "yyyymmdd") . "_" . replace(trim(<clp>), " ", "_"));
One of my scripts helped you out? Please donate via Paypal
Re: script request to quickly rename file with date
Thanks. Please tell me if I did the right steps because I'm getting an error (attached):
1. Went to User > Managed User-Defined Commands
2. Under category, I clicked 'Run Script'
3. Added a new command, then on the script field, I pasted the one you provided.
Now when I click on a file and trigger this command, I get some error. Please help.
1. Went to User > Managed User-Defined Commands
2. Under category, I clicked 'Run Script'
3. Added a new command, then on the script field, I pasted the one you provided.
Now when I click on a file and trigger this command, I get some error. Please help.
- Attachments
-
- ss_2023-02-10_14-33-04.png (334.13 KiB) Viewed 495 times
Re: script request to quickly rename file with date
Show the button definition with the script part visible...
One of my scripts helped you out? Please donate via Paypal
Re: script request to quickly rename file with date
It seems like you are running the script with the script still on the clipboard.
Re: script request to quickly rename file with date
Thanks for all your input. It took me some tries to finally get the hang of it.
Thanks a lot! It works!
Thanks a lot! It works!