Imported from a post on Get Satisfaction : https://getsatisfaction.com/iformbuilder/topics/downloading_image_and_sound_files
We use the excel analytic feed to access our data. To get at the sound and image files, we have to click on a link for each file in each case. Is there a means to automate or expedite this process?
Also, for these files, are there any conventions used for determining the file name as stored on the server?
Can't find what your looking for? Before submitting a request look here!
Comments
2 comments
Here is something one of our users shared in regards to downloading files in bulk.
Hi all
Whilst we are waiting for functionality to be developed that allows download images and media in bulk, I found a way to do this using the Excel Data Feed in the interim that works well. I tweaked it a little to suit myself, however you can download the original source here:
http://www.excelforum.com/excel-gener...
In my version, I fixed a bug and updated the hyperlink to actually point to the downloaded file as well as updating the display text accordingly.
Here is my version of the script (just copy and paste into the VBA Editor and run):
** Const TargetFolder = "C:\temp\"
Private Declare Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" _
(ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Sub Test()
For Each Hyperlink In ActiveSheet.Hyperlinks
LocalFileName = ""
For N = Len(Hyperlink.Address) To 1 Step -1
If Mid(Hyperlink.Address, N, 1) <> "/" Then
LocalFileName = Mid(Hyperlink.Address, N, 1) & LocalFileName
Else
Exit For
End If
Next N
'Call HTTPDownloadFile(Hyperlink.Address, TargetFolder & LocalFileName)
Hyperlink.Address = TargetFolder & LocalFileName
Hyperlink.TextToDisplay = LocalFileName
Next Hyperlink
End Sub
Sub HTTPDownloadFile(ByVal URL As String, ByVal LocalFileName As String)
Dim Res As Long
On Error Resume Next
Kill LocalFileName
On Error GoTo 0
Res = URLDownloadToFile(0&, URL, LocalFileName, 0&, 0&)
End Sub **
I have also found a pretty nifty tool that works very similarly to Mac's Automator.
just go to http://app.jbbres.com/actions/
Get your list of URLs from your feeds into one long column.
download the attached action script
Run the action script by pressing the "Play" button on the top right
Paste the column when prompted
Select the location to save the media when prompted
Let it run!
I had some difficulties with encoding at first but it seems that a straight copy/paste from excel works just fine. just make sure you can actually see each link on a separate line. if you paste from notepad or such, it may not recognize the newline characters.
Other than that, i run this once a week to get a lot of column's worth of images for hundreds of records. it takes a tiny bit of time, but it beats having to brute force my way into it.
Enjoy !
Please sign in to leave a comment.