How can I upload to a folder inside a folder (String question)?

0 votes
asked Nov 26, 2011 by Rob T (350 points)
edited Nov 27, 2011

When uploading a file, I need it to do to upload the file to the "ID" folder... Like below:

mysite.com/files/HTMLLogs/AGENCY NAME/ID

I can upload the files to the AGENCY NAME folder, no problems, but uploading to the ID folder inside the AGENCY NAME folder is throwing me. Can someone take a look at my string and help me with it?

client.PutFiles(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\DailyLog\HTMLlogs\*",
                        String.Format("/files/HTMLLogs/{0}", lblAgency.Text, "/", "{0}", lblID.Text), FtpBatchTransferOptions.Recursive, FtpActionOnExistingFiles.OverwriteAll)
commented Nov 27, 2011 by Rob T (350 points)
edited Nov 27, 2011

String.Format("/files/HTMLLogs/{0}", lblAgency.Text, "/{0}", lblID.Text),

This isn't working either.

commented Nov 27, 2011 by Rob T (350 points)
edited Nov 27, 2011

Neither does

String.Format("/files/HTMLLogs/{0}/{0}", lblAgency.Text, lblOfficer.Text),

1 Answer

0 votes
answered Nov 27, 2011 by Rob T (350 points)
edited Nov 27, 2011
 
Best answer

Got it!

String.Format("/files/HTMLLogs/{0}/{1}", lblAgency.Text, lblOfficer.Text),
...