Rename a file wihtout pressing f2

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
RPM7
Posts: 7
Joined: 12 Jan 2023 18:18

Rename a file wihtout pressing f2

Post by RPM7 »

Is it possible to rename a file without pressing f2 by pasting from clipboard?

Ex: Let's say I have the phrase "hello world" in the clipboard, and I want to rename a file with this phrase, normally I'd have to select the file and press f2 then ctrl+v, I would like to rename the file without pressing f2, only using a keyboard shortcut.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Rename a file wihtout pressing f2

Post by highend »

Menu - User - Manage Commands...
Category: Run Script
Button: New...

Caption: Rename with clipboard content (or whatever you want to call it)
Script: renameitem(<clp>);

Button: Assign Keyboard Shortcut...
One of my scripts helped you out? Please donate via Paypal

RPM7
Posts: 7
Joined: 12 Jan 2023 18:18

Re: Rename a file wihtout pressing f2

Post by RPM7 »

It works. Thank you very much!

RPM7
Posts: 7
Joined: 12 Jan 2023 18:18

Re: Rename a file wihtout pressing f2

Post by RPM7 »

When I copy a name from a file that has a dot "." in the name it deletes the extension of the file that I paste the name in.

Example: "Read .me this.txt" becomes "Read .me this"

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Rename a file wihtout pressing f2

Post by highend »

Then use renameitem(<clp>, , 1);?
One of my scripts helped you out? Please donate via Paypal

RPM7
Posts: 7
Joined: 12 Jan 2023 18:18

Re: Rename a file wihtout pressing f2

Post by RPM7 »

It worked, thanks!

Post Reply