Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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)


Topic review


Re: Ignore folder structure when copying the files.

Hey Martin! I could load the extension into the WinSCP but can't figure how to run this to the actual synchronization.

Re: Ignore folder structure when copying the files.

You can write a simple PowerShell script for that.
We have an example for download:

Upload would be similar.

Actually, this code will do what you want:
If you modify it to:
1) replace $remoteFilePath with $remotePath in the $session.PutFiles call
2) remove if (!($session.FileExists($remoteFilePath))) { $session.CreateDirectory($remoteFilePath) }

It's just unnecessarily complicated for your simpler needs.
On the other hand, it's prepared to be used as a WinSCP extension, so it can be installed into WinSCP GUI.

For a simple code, see

Ignore folder structure when copying the files.


Is it possible to ignore local directory file structure when copying files?
Let's say we've got a couple of files in subdirectories as follows:


Is there a way to put those 'testa*.txt' files on FTP server without copying the folder structure. Ideally, I would like all the files to be dropped into a single folder on the FTP server, is there a way to do it?