Been at this for two days...
My appication sends folders and files to a server with upload. On the computer, the path is as follows:
C:UsersrtaylorAppDataLocalDailyLogFiles45
The folder 45 varies. That value comes from a label on my main form called lblID. Whatever value is in lblID is the name of the folder created on my PC. The structure goes like this on my local PC:
.../45
.../45/2010
.../45/2011
.../45/2012
SO basically, inside the folder "45" are folders with years, and inside the years are text files. And these folders/files get uploaded to the server.
The code to UPLOAD works A-ok, with no issues whatsoever. Here is the code:
client.PutFiles(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\DailyLog\Files\" & "" & lblID.Text & "*",
String.Format("/files/backuplogfiles/"),
FtpBatchTransferOptions.Recursive, FtpActionOnExistingFiles.OverwriteDifferentSize)
SERVER SIDE:
On the server, it goes like this:
/myurl.net/files/backuplogfiles/45
Then .../45
.../45/2010
.../45/2011
.../45/2012
Inside the 45 folder (remember, this value changes based on the lblID.text in the frmMain) are the years I uploaded.
PROBLEM:
Downloading these files back to the PC is making me pull my hair out.
Here is the code I have:
client.GetFiles(String.Format("/files/backuplogfiles/{0}/*", lblID.Text),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "\DailyLog\Files\"),
FtpBatchTransferOptions.Recursive, FtpActionOnExistingFiles.OverwriteAll)
I just want to take that whole folder called 45 (or lblID.Text) and put it back in the local PC where it belongs...
I'm getting the error- Could not find target directory ('DailyLogFiles'). But I have that in the path.
Can someone take a look at this for me?