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

dewebworks

Put Multiple Files

Might be a dumb question, but this code puts a single file:

Dim transferOptions As New TransferOptions
transferOptions.TransferMode = TransferMode.Binary
transferOptions.PreserveTimestamp = False

transferResult = session.PutFiles(fileLocation & fileName, homeDirectory & fileName, False, transferOptions)

I want to push all files in fileLocation (but not the folders, just the files).

If I do this:
transferResult = session.PutFiles(fileLocation, homeDirectory, False, transferOptions)

Then it creates a folder on the remote server called '' and it moves all files and sub folders into that folder.
What am I missing?