Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.6: Copy URLs from downloaded files Desktop
Snow Leopard only hintIf you download a file with Safari or certain other programs, you may be able to copy its download URL from its Get Info window.

Select the file in the Downloads folder (or elsewhere) and press command-I. Find the Where From ntry in the More Info section of the Get Info window. Hold down the mouse button and drag across the URL listed there to select it, then choose Copy from the Edit menu (or press Command-C).

[robg adds: This will only work in 10.6; 10.5 won't let you select the text in that field. I'm not sure which browsers/apps other than Safari record this data; Firefox does not.]
    •    
  • Currently 2.46 / 5
  You rated: 5 / 5 (13 votes cast)
 
[6,798 views]  

10.6: Copy URLs from downloaded files | 10 comments | Create New Account
Click here to return to the '10.6: Copy URLs from downloaded files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Copy URLs from downloaded files
Authored by: kenandles on Mar 04, '10 08:02:31AM

You can also get the the url from the download window, select the file and control click the source url.

Is this not the same thing



[ Reply to This | # ]
Camino does save this info (n/t)
Authored by: Kalak on Mar 04, '10 08:14:00AM

nothing to see here

---
--
Kalak
I am, and always will be, an Idiot.



[ Reply to This | # ]
10.6: Copy URLs from downloaded files
Authored by: Fenton on Mar 04, '10 08:37:50AM

I guess Safari writes it to the metadata for the file downloaded. I have the following AppleScript (I got the command line from somewhere), saved as an application, which I drop download files onto. It puts the URL path(s) onto the clipboard (as I'm usually doing this to save a link to email someone):

on open (file_drop)
set file_alias to item 1 of file_drop
set pos_file to quoted form of POSIX path of file_alias

set URLs to do shell script "/usr/bin/mdls -name kMDItemWhereFroms " & pos_file & " | egrep 'http:'"
-- download URL, could be more than 1 line
set the clipboard to URLs
display dialog "The URLs are on the clipboard" buttons {"OK"} default button 1
end open

---
FileMaker Developer
San Diego



[ Reply to This | # ]
10.6: Copy URLs from downloaded files
Authored by: jazzbox on Mar 04, '10 08:39:35AM

Interesting hint!

The info is stored in metadata as you can see one the command line:

$ xattr downloadedfile
com.apple.metadata:kMDItemWhereFroms

$ mdls downloadedfile
kMDItemWhereFroms = (
"http://www.somedomain.com/downloadedfile"
)



[ Reply to This | # ]
10.6: Copy URLs from downloaded files
Authored by: atlpeg on Mar 04, '10 12:22:39PM

Chrome seems to set this information as well.



[ Reply to This | # ]
10.6: Copy URLs from downloaded files
Authored by: rab777hp on Mar 04, '10 12:50:46PM

Rob-
this is a repeat hint, you published the same but from me a while ago:
http://www.macosxhints.com/article.php?story=20091006192100966



[ Reply to This | # ]
10.6: Copy URLs from downloaded files
Authored by: llee on Mar 04, '10 04:24:07PM

I spent a while searching for it before submitting, but obviously missed yours. Sorry.



[ Reply to This | # ]
10.6: Copy URLs from downloaded files
Authored by: rab777hp on Mar 04, '10 04:30:57PM

Yeah that's one of the problems, there's no good way to search. It's not the fault of the search, which is good, and is helpful when you know what you're looking for, as in which hint (which is where a good memory helps), but that there are so many variables for titles etc. What you and I both expressed in essentially the same hint were worded completely differently. I guess keywording would be a way around this, would be a good addition to the site.



[ Reply to This | # ]
10.6: Copy URLs from downloaded files
Authored by: rab777hp on Mar 04, '10 04:34:47PM

So for example here: http://www.macosxhints.com/search.php?query=copy+urls&keyType=all&title=true&datestart=&dateend=&topic=0&type=all&results=50&mode=search I had a good search showing the two hints, but I had to be specific, specify where the words were to be found and I also knew already the phrasing of the two hints.



[ Reply to This | # ]
10.6: Copy URLs from downloaded files
Authored by: sjk on Mar 09, '10 12:04:10PM