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. General Programming
  3. Visual Basic
  4. Uploading Problem

Uploading Problem

Scheduled Pinned Locked Moved Visual Basic
csharpcomhelpquestion
5 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.
  • C Offline
    C Offline
    cwayman
    wrote on last edited by
    #1

    Hey, I found a component here[^] for using FTP in VB.NET. I have written a recursive loop to look through a directory and upload the files. My problem is that you need to change to a directory (Using folder name on FTP only not having a full path) on one pass, then change to a sub folder on the next pass and so on, this ends up uploading this original folder structure: Parent ------ Folder 1 ----------- Sub Folder 1 ------ Folder 2 ----------- Sub Folder 2 into Parent ------ Folder 1 ---------- Sub Folder 1 ---------------- Folder 2 --------------------- Sub Folder 2 So after ending one branch its doesnt go back to the root and start the other branch, As because Sub Folder 1 has no childnodes it should go back to the root and create the recursion of the Folder 2 branch, but it just recurses all the way through in one branch. Is there a way to upload a single folder only, in this case the Parent folder, or a way to solve my problem? Thanks for your time Chris

    D 1 Reply Last reply
    0
    • C cwayman

      Hey, I found a component here[^] for using FTP in VB.NET. I have written a recursive loop to look through a directory and upload the files. My problem is that you need to change to a directory (Using folder name on FTP only not having a full path) on one pass, then change to a sub folder on the next pass and so on, this ends up uploading this original folder structure: Parent ------ Folder 1 ----------- Sub Folder 1 ------ Folder 2 ----------- Sub Folder 2 into Parent ------ Folder 1 ---------- Sub Folder 1 ---------------- Folder 2 --------------------- Sub Folder 2 So after ending one branch its doesnt go back to the root and start the other branch, As because Sub Folder 1 has no childnodes it should go back to the root and create the recursion of the Folder 2 branch, but it just recurses all the way through in one branch. Is there a way to upload a single folder only, in this case the Parent folder, or a way to solve my problem? Thanks for your time Chris

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Without seeing your code to walk through and duplicate the directory tree, there is no way anyone can solve your problem. But, I will tell you that your not setting the current directory properly on the copy your making. Remember "CD .." changes the current directory to its parent. FTP does not allow for transfering of an entire directory structure. Your application has to walk the tree and rebuild it itself. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      C 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Without seeing your code to walk through and duplicate the directory tree, there is no way anyone can solve your problem. But, I will tell you that your not setting the current directory properly on the copy your making. Remember "CD .." changes the current directory to its parent. FTP does not allow for transfering of an entire directory structure. Your application has to walk the tree and rebuild it itself. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        C Offline
        C Offline
        cwayman
        wrote on last edited by
        #3

        Hey, Thanks i have emailed you the code, was a bit much to post here. Thanks for your time Chris

        D 1 Reply Last reply
        0
        • C cwayman

          Hey, Thanks i have emailed you the code, was a bit much to post here. Thanks for your time Chris

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          I've got it, but in the future, post the code here, not to my personal email. I've barely got any time to do stuff with my girlfriend let alone look at everyones code that sends it directly too me. Besides, posting it here will give other people a chance to take a look at your problem in the event I go on vacation and ignore my Inbox and work life for a week or two... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          C 1 Reply Last reply
          0
          • D Dave Kreskowiak

            I've got it, but in the future, post the code here, not to my personal email. I've barely got any time to do stuff with my girlfriend let alone look at everyones code that sends it directly too me. Besides, posting it here will give other people a chance to take a look at your problem in the event I go on vacation and ignore my Inbox and work life for a week or two... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            C Offline
            C Offline
            cwayman
            wrote on last edited by
            #5

            Apologies. I know the feeling. Will take for future. Thanks C

            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