Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Loop through all files in Images folder

Loop through all files in Images folder

Scheduled Pinned Locked Moved ASP.NET
csharptestingbeta-testingquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sifar 0
    wrote on last edited by
    #1

    Hi Everyone, I ve a simple testing Website and i used c#. I just want to list all FileNames from a specific folder.(e.g. Images) How can i loop through all files in Images folder in c#. User can upload images to that folder also. so i want to do the listing in Load event of the page. Please suggest..

    Regards, -SIFAR.

    P 1 Reply Last reply
    0
    • S Sifar 0

      Hi Everyone, I ve a simple testing Website and i used c#. I just want to list all FileNames from a specific folder.(e.g. Images) How can i loop through all files in Images folder in c#. User can upload images to that folder also. so i want to do the listing in Load event of the page. Please suggest..

      Regards, -SIFAR.

      P Offline
      P Offline
      Prasanna Kumar Pete
      wrote on last edited by
      #2

      Use

      string[] arrFiles = Directory.GetFiles(strPath);

      you will get the list files in a array of strings

      Thanks & Regards Pete

      S 1 Reply Last reply
      0
      • P Prasanna Kumar Pete

        Use

        string[] arrFiles = Directory.GetFiles(strPath);

        you will get the list files in a array of strings

        Thanks & Regards Pete

        S Offline
        S Offline
        Sifar 0
        wrote on last edited by
        #3

        It's done, Thanks Prasanna.

        Regards, -SIFAR.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups