Uploading Problem
-
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
-
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
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
-
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
-
Hey, Thanks i have emailed you the code, was a bit much to post here. Thanks for your time Chris
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
-
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