Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4572786
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:41:43+00:00 2026-05-21T19:41:43+00:00

I’m not used to work with remote resources, so maybe this question is trivial,

  • 0

I’m not used to work with remote resources, so maybe this question is trivial, but I’m not sure how to implement it.

I need to load a collection of images that are placed in a http folder, for example http://www.myexsamplesite.com/images.

Inside this directory I could have N images with different names.

I need to show these images in a WinForms application (in a ListView).

The alternative that I’m studying is downloading the images to a tmp dir, and then load them from disk from my WinForms application. I’m using the following:

WebClient fileReader = new WebClient();
 fileReader.DownloadFile(imageAddress, filePath);

to download the files to disk. My question is:

How can I download all the files in the http folder? I guess that I need to enumerate the files in the folder and then download one to one.

The second question and most important. I’m sure that there is a much better mechanism to perform this task. So:

Is there any other way to get the http image content into a System.Drawing.Image?

Remember that I need to get all the files in the http folder.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:41:43+00:00Added an answer on May 21, 2026 at 7:41 pm

    First, to get all of the files, you need a way to enumerate them. HTTP does not have any method that lets you download a whole directory, or technically even list what’s in a directory. Some web servers are set to send you a pre-defined web page which displays the list of files in a directory when it lacks a default page, but not all are. You could parse that content to get a list of the files you need to download. Otherwise, you’ll need to find a way to get that info programmatically, based on the web application itself.

    Second, you can load an image from a stream, as I recall. Instead of using WebClient, you can use HttpWebRequest so that you can access the content stream, and feed that into your constructor. However, I think it may be better/easier for you to use a temp directory and load the files from there. Sometimes unexpected things might happen when loading things from a network stream like this (for example, the stream of GIF images with animations is attempted to be kept open to continually read the frames of the animation), which could cause exceptions at odd times you might not be prepared to debug and understand off the bat.

    Finally, note that you would only be using mime type here to verify that your content is an image – so you explicitly would not load something that is mime type application/octet-stream into an image object – but only things like image/jpeg, image/gif, image/png etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I need a function that will clean a strings' special characters. I do NOT
For some reason, after submitting a string like this Jack’s Spindle from a text
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.