AutoHotkey Community

It is currently May 27th, 2012, 10:53 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: October 27th, 2006, 9:55 pm 
Offline

Joined: May 19th, 2006, 4:56 am
Posts: 166
Is it possible to select a file in Windows Explorer and copy its Location and Filename?

Ex.

Select file test.pdf in C:\PDF Files folder.

Clipboard = C:\PDF Files\test.pdf


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 27th, 2006, 10:23 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
I know no easy way.. BTW, are you desperate for it?
I am able to think of not-so-elegant work arounds!

:?:

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 27th, 2006, 10:32 pm 
Offline

Joined: May 19th, 2006, 4:56 am
Posts: 166
Goyyah wrote:
I know no easy way.. BTW, are you desperate for it?
I am able to think of not-so-elegant work arounds!

:?:


I have a somewhat automated way of doing it now. The reason I do this is because I send emails often to coworkers with a link to a new PDF I created. These PDFs are on a network drive, and are always in a set folder. I have a autoreplace script that when I type "zzz" it replaces that with the path of the PDF directory. I then enter the filename.pdf after than manually.

I was hoping to find a way to select a file in that directory, and have it automatically do this.

If you have any ideas, I would like to hear them :)


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 27th, 2006, 10:35 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
scriptmonkey wrote:
I was hoping to find a way to select a file in that directory, and have it automatically do this.


More clarification need:

Something like this?

You are on Windows Explorer & you press a hotkey like CTRL+WIN+LeftMouseButton on a file and the clipboard shall contain the long file path of the clicked upon file.

Is that okay for you?

:?:

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 27th, 2006, 10:50 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
You can get the selected file name with:
Code:
ControlGet, file, List, Selected Focused, SysListView321, A
StringLeft, file, file, InStr(file, A_Tab)

There may be ways to get the full path of an explorer window, try searching.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 28th, 2006, 12:21 am 
Offline

Joined: May 19th, 2006, 4:56 am
Posts: 166
Yep, thats what im looking for.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2006, 10:57 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Just send ^c and you get the paths in the Clipboard variable...
Also take a look at: Get the current path of a Window Explorer

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 28th, 2006, 3:28 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
scriptmonkey wrote:
Yep, thats what im looking for.


Quote:
How to retrieve File fullpath from Explorer ?
http://www.autohotkey.com/forum/viewtopic.php?p=86542#86542


:)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 28th, 2006, 6:30 pm 
Offline

Joined: May 19th, 2006, 4:56 am
Posts: 166
Goyyah wrote:
scriptmonkey wrote:
Yep, thats what im looking for.


Quote:
How to retrieve File fullpath from Explorer ?
http://www.autohotkey.com/forum/viewtopic.php?p=86542#86542


:)


Thanks Goyyah. Seems to work great. Im going to try and edit it so each filename is shown underneath the previous, instead of seperated by a comma.

_________________
Zak M.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 28th, 2006, 6:34 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
scriptmonkey wrote:
Im going to try and edit it so each filename is shown underneath the previous, instead of seperated by a comma.


You do not have to it, as it is already the default behaviour.

:)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 28th, 2006, 6:40 pm 
Offline

Joined: May 19th, 2006, 4:56 am
Posts: 166
Goyyah wrote:
scriptmonkey wrote:
Im going to try and edit it so each filename is shown underneath the previous, instead of seperated by a comma.


You do not have to it, as it is already the default behaviour.

:)


Ahh, I see. I first tested it in Notepad, and it didnt seperate each filename. I tried it in an email and it works :)

THanks.

_________________
Zak M.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 3rd, 2009, 6:36 am 
You can use this shortcut to copy just the full location of any selected file to the clipboard surrounded in quotes.

Code:
Send +{Click right}a


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 3rd, 2009, 7:47 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
That would require the mouse pointer to be over the file, unless you use +{AppsKey} instead of +{Click right}.

It also relies on the "Copy as Path" option which is a Windows Vista feature, and won't work if the file is executable since there will also be "Run as administrator".


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 5th, 2009, 5:55 pm 
Offline

Joined: October 13th, 2008, 4:14 pm
Posts: 60
Location: South Park, Colorado
Code:
Send ^c
ClipWait
Sort, Clipboard


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Google Feedfetcher, HotkeyStick and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group