We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Download multiple files in one request

MrB8r
MrB8r asked
on
Medium Priority
351 Views
Last Modified: 2013-12-16
I got a list of files to download from a server.
Download links look like:

http://my-server/record/download.cgi?recordingid=20110427_161041_4CED_00408CAC9090

When I click the above link, it opens up the File Dialog to allow me to open or save the file.

I need to iterate through a list of such recordingid's and download all files in a one go (as a single zipped file or multiple files).

I'm looking for something like:

List<string> recordings = GetListOfRecordingIDs();

foreach (string recID in recordings)
{
     String strUrl = "http://my-server/record/download.cgi?recordingid=" + recID;
     //Code to download the list of files(strUrl) here;
}

Open in new window

Comment
Watch Question

Software Architect in .Net
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
John ClaesSenior .Net Consultant & Technical Analist

Commented:
i would suggest the folowing ....

You have The List of FileId's you want to download.
I would suggest the following .

Demand the safe location at the user (only use the directoryName)
Loop through the FileId's
*   Call the Method of RolandDeschain
    *   SAVE_PATH = the retreived directoryName  + the FileName for the current FileId
    *   URL = Your URL using the current FileId

poor beggar

Author

Commented:
Sorry I was too busy to try this until today.

Thanks RolandDeschain and poor_begger.
I have used RolandDesichain method and looped through as per poor_begger's note and got it all done.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.