Copy as Path utility (create link to file)

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
montanan
Junior Coder
Posts: 49
Joined: Mon Jul 09, 2007 3:44 pm
Location: San Jose, CA

Copy as Path utility (create link to file)

Post by montanan » Tue Jan 26, 2016 11:00 pm

Hello folks.

I frequently need to create links to files located in various Windows directories. Here is the script I use, in Windows 10 (I believe it will work in Windows 7 as well, but not sure how far back beyond that). I associate a Hot Key with my script so that I can use it at any time.

To use this script...

1) select a file in Windows Explorer
2) run the script (which will create the link and place it on the clipboard)
3) paste the link wherever you want to use it

I hope it's helpful to others.

-Richard

Code: Select all

//Copy as Path utility

Wait>1
Press>Shift
RClick
Release>Shift
Wait>1
Send>a
Wait>1
WaitClipBoard
GetClipBoard>clipdata
StringReplace>clipdata,",,clipdatatransone
StringReplace>clipdatatransone,SPACE,%20,clipdatatranstwo
PutClipBoard>file:///%clipdatatranstwo%
Exit

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: Copy as Path utility (create link to file)

Post by CyberCitizen » Wed May 18, 2016 3:42 am

Didn't work for me, however I use http://stefan.bertels.org/en/clipboardpath

The reason I use this is you can hold down shift when selecting the drop down option to return the full network name / path (not just the mapped drive).
FIREFIGHTER

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts