Welcome Guest.   Make a donation to an author on the site October 31, 2014, 09:01:47 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Free DonationCoder.com Member Kit: Submit Request.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Get Filepath  (Read 7615 times)
lanux128
Global Moderator
*****
Posts: 6,121



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: April 07, 2008, 10:15:55 PM »

this is a small program written in AHK to get the file-path of the file parsed at command-line. the story behind this: whenever i'm viewing a document/image, sometimes i'd need the file-name or path. and for that purpose, this can be used where you can assign this program as an "external tool" and use the hot-key/menu to access this item. if it was a legitimate file then a tooltip will appear saying file-path is copied. if there is any improvements that can be made, feel free to download the source and modify.

IrfanView as an example


Edit1: added a small usage demo. btw, the tray-tip couldn't be captured, so i'm pointing at nothing in the tray area (where the icon briefly appears). Wink

http://lanux128.dcmembers.com/misc/Using_Get_Filepath_with_IrfanView.swf

Edit2: fixed the demo link.

* GetFilePath.exe (251.29 KB - downloaded 283 times.)
* GetFilePath.ahk (0.2 KB - downloaded 303 times.)
« Last Edit: May 26, 2010, 02:17:38 AM by lanux128 » Logged

wr975
Charter Member
***
Posts: 369



View Profile Give some DonationCredits to this forum member
« Reply #1 on: April 08, 2008, 05:58:35 AM »

Another way to get the filepath:

http://home.worldonline.d...ech/freeutil.htm#pathcopy

* pathc400.zip (155.34 KB - downloaded 262 times.)
« Last Edit: April 08, 2008, 06:02:41 AM by wr975 » Logged
justice
Supporting Member
**
Posts: 1,889



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: April 08, 2008, 06:51:42 AM »

Nice work Lanux be sure to add a shorcut to GetFilePath.exe to your SendTo folder (start -> run -> sendto OR start -> shell:sendto) for it to be availalble in nearly any application. For some reason the traytip is not showing for me on vista (but there's no fault in your code so I assume a restart will fix that for me)

I was adding in automatic drive mapping for UNC but got stuck and had to give up. It's easy to detect if the first two characters are \\ and you can run the command "net use * %filepath%" to map to a available drive. However I'm not sure how to retrieve the output of net use, take the 2nd word from the 1st line (which is the drive letter) to form the new filepath string.


Edit: Success! added UNC mapping., the folder in which the file resides is automatically mapped to a driveletter.



* GetFilePath.ahk (0.63 KB - downloaded 289 times.)
« Last Edit: April 08, 2008, 07:36:32 AM by justice » Logged

lanux128
Global Moderator
*****
Posts: 6,121



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: April 08, 2008, 09:29:18 PM »

justice: thanks for adding the UNC path and for traytip, i'm not sure why it doesn't show-up (no Vista here) but try changing the 'sleep' time. smiley
Logged

Armando
Charter Member
***
Posts: 2,682



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #4 on: April 08, 2008, 11:14:25 PM »

Thanks lanux.

(I use farr a lot to quickly get full path to files, links, etc. (ctrl+c on the selected item) )
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
lanux128
Global Moderator
*****
Posts: 6,121



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: April 09, 2008, 12:32:52 AM »

you're welcome, Armando. smiley i too sometimes use Farr get file-paths but this tool is useful when the image/document is already open and the Windows context-menu is not available. btw, i've added a small demo on the usage since i sure it will be more clearer that way.
Logged

justice
Supporting Member
**
Posts: 1,889



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: April 09, 2008, 05:53:26 AM »

No problems now with the tray tip by the way, I had more problems that session but a restart fixed it. Also this would be a good progrma to add to a barnacle toolbar if you're using that.
« Last Edit: April 09, 2008, 05:55:04 AM by justice » Logged

delwoode
Supporting Member
**
Posts: 142


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #7 on: April 06, 2011, 08:53:57 AM »

I must be really dumb as I couldnt understand what the video was trying to show me
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.03s | Server load: 0.05 ]