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. How to upload all files from source folder to web path.

How to upload all files from source folder to web path.

Scheduled Pinned Locked Moved ASP.NET
sysadmintutorialquestion
7 Posts 3 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.
  • N Offline
    N Offline
    NetRams
    wrote on last edited by
    #1

    Hi, I need to upload all files from the given client's physical folder path to server path. How do I upload all files to web server path without using "file" type. Rams.

    Be simple and Be sample.

    S N 2 Replies Last reply
    0
    • N NetRams

      Hi, I need to upload all files from the given client's physical folder path to server path. How do I upload all files to web server path without using "file" type. Rams.

      Be simple and Be sample.

      S Offline
      S Offline
      Sandeep Akhare
      wrote on last edited by
      #2

      ramskr wrote:

      web server path without using "file" type.

      But whats the problem with File type ?

      Thanks and Regards Sandeep If you want something you never had, do something you have never done!

      N 1 Reply Last reply
      0
      • S Sandeep Akhare

        ramskr wrote:

        web server path without using "file" type.

        But whats the problem with File type ?

        Thanks and Regards Sandeep If you want something you never had, do something you have never done!

        N Offline
        N Offline
        NetRams
        wrote on last edited by
        #3

        User can be able to choose only the folder, not the files.

        Be simple and Be sample.

        1 Reply Last reply
        0
        • N NetRams

          Hi, I need to upload all files from the given client's physical folder path to server path. How do I upload all files to web server path without using "file" type. Rams.

          Be simple and Be sample.

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          ramskr wrote:

          How do I upload all files to web server path without using "file" type.

          First get the files in that directory using

          System.IO.Directory.GetFiles

          The above line will return all the files present in the directory as a string array.

          ramskr wrote:

          I need to upload all files from the given client's physical folder path to server path.

          Use webclient class. It is having upload method. Start a loop till end of the above string array and upload each file using webclient method in the loop. Finally dispose webclient object


          printf("Navaneeth!!") www.w3hearts.com

          N 1 Reply Last reply
          0
          • N N a v a n e e t h

            ramskr wrote:

            How do I upload all files to web server path without using "file" type.

            First get the files in that directory using

            System.IO.Directory.GetFiles

            The above line will return all the files present in the directory as a string array.

            ramskr wrote:

            I need to upload all files from the given client's physical folder path to server path.

            Use webclient class. It is having upload method. Start a loop till end of the above string array and upload each file using webclient method in the loop. Finally dispose webclient object


            printf("Navaneeth!!") www.w3hearts.com

            N Offline
            N Offline
            NetRams
            wrote on last edited by
            #5

            I need the list of client side files for the selected folder. For eg, if user choose D:\Test, my web application needs to upload all files in that client folder to web path. If we use system.io.directory.getfiles - it searches on server and cause exception as "could't find the path".. Is there any way to get all files on client machine and upload to server machine.

            Be simple and Be sample.

            N 1 Reply Last reply
            0
            • N NetRams

              I need the list of client side files for the selected folder. For eg, if user choose D:\Test, my web application needs to upload all files in that client folder to web path. If we use system.io.directory.getfiles - it searches on server and cause exception as "could't find the path".. Is there any way to get all files on client machine and upload to server machine.

              Be simple and Be sample.

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              ramskr wrote:

              Is there any way to get all files on client machine and upload to server machine.

              Upto my knowledge there is no method to do this using server side scripting. Because this will break the security system. If a server side script can list out the files in your directory then what is the security for your files ?


              printf("Navaneeth!!") www.w3hearts.com

              N 1 Reply Last reply
              0
              • N N a v a n e e t h

                ramskr wrote:

                Is there any way to get all files on client machine and upload to server machine.

                Upto my knowledge there is no method to do this using server side scripting. Because this will break the security system. If a server side script can list out the files in your directory then what is the security for your files ?


                printf("Navaneeth!!") www.w3hearts.com

                N Offline
                N Offline
                NetRams
                wrote on last edited by
                #7

                Hi, I need user on client machine to select path from that machine (local folder only). On Upload, my web application needs to get all the files in that folder and upload it to fixed server path. All I need is to get files for the selected client path.

                Be simple and Be sample.

                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