Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

cnoffki

Ok thank you!
martin

Re: Maintain Folder Structure

There's no way to have WinSCP do this for you automatically.

You have to manually recurse the local tree and move the files one by one.

See this example Recursively download directory tree with custom error handling
(it's for download, not upload, but the principle is the same)
cnoffki

Maintain Folder Structure

I have a local folder structure, from which I'm uploading files to a remote server using
.Protocol = Protocol.Scp

I would like to maintain the local folder structure and just upload the files and delete them (the files, not the folders) when done.

I'm running a VB.NET console app, and my put files is the following :
transferResult =
    session.PutFiles("D:\remindererrors\", "remindererrors/", True, transferOptions)

I've tried several combinations of \, \* but it always seems to delete the local folders.... Can anyone help with the correct syntax?

Thanks!