Copy the path of "new folder"

Discuss and share scripts and script files...
Post Reply
bababarghi
Posts: 22
Joined: 01 May 2014 01:40

Copy the path of "new folder"

Post by bababarghi »

Hi all,

Can I have a script to copy the path of the last NEW FOLDER created by user?

I want this script to be running all the times i.e. whenever I create a new folder, the path of it should be copied into clipboard. Is it possible?

Regards
bababarghi

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

Re: Copy the path of "new folder"

Post by jupe »

This is one way of doing it, I don't know if it will suit you exactly though.

If you want the whole path:

Code: Select all

  copytext new(input("Folder Name", , "NewFolder"), "dir");
or if you just want the folder name:

Code: Select all

  copytext gpc(new(input("Folder Name", , "NewFolder"), "dir"), "file");
you would have to use it each time you want to create a folder, it wouldn't work if you created a folder via other means (like context menu etc), you could also assign it a shortcut key via UDC.

https://www.xyplorer.com/highlights.php#udc

bababarghi
Posts: 22
Joined: 01 May 2014 01:40

Re: Copy the path of "new folder"

Post by bababarghi »

jupe wrote:This is one way of doing it, I don't know if it will suit you exactly though.

If you want the whole path:

Code: Select all

  copytext new(input("Folder Name", , "NewFolder"), "dir");
or if you just want the folder name:

Code: Select all

  copytext gpc(new(input("Folder Name", , "NewFolder"), "dir"), "file");
you would have to use it each time you want to create a folder, it wouldn't work if you created a folder via other means (like context menu etc), you could also assign it a shortcut key via UDC.

https://www.xyplorer.com/highlights.php#udc

Perfect ! That was all I needed. :appl:

Post Reply