Re: Copy just the file
There's no script command to do this.
However it should be relatively simple to write a script (e.g. using PowerShell) to generate a WinSCP script with a one command for each file:
put C:\Files\XYZ\June\abc.pdf /home/abc.pdf
put C:\Files\XYZ\May\jkl.pdf /home/jkl.pdf
There are more than just 2 puts to be written though.
The goal is the have an automated solution where with a statement like this
put "C:\Files\FolderName\*" -filemask=*2014/June/*.pdf|SENT_*.pdf "/home/FileFolder"
will send all the files from C:\Files\FolderName\SubFolder\Year\Month where it has a 2014\June path in it
ie
Files\XYZ\2014\June\
Files\XYZ\xyz sub\2014\June\
Files\ABC\2014\June
files from those folders will go to /home/filefolder
without the folder structures and without having to create a put for ever folder structure where there are thousands.
Currently it is making a folder structure
fileFolder
-XYZ
--2014
---June
----file
--xyz sub
---2014
----June
-----file2
-ABC
--2014
---June
----file3
where I would want just
fileFolder
-file1
-file2
-file3
Is this not possible?