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

martin

Re: upload from multiple local directory to 1 remote directory

Anonymous wrote:

Do you mean write a script that will recursively loop through every picture subdirectories and then upload each file?

Something like that. You do not need to upload every file separately, just every directory.
Guest

Re: upload from multiple local directory to 1 remote directory

martin wrote:

You cannot do this with just WinSCP script. You have to create script in some scripting language that creates WinSCP script to do the task.


Do you mean write a script that will recursively loop through every picture subdirectories and then upload each file?
martin

Re: upload from multiple local directory to 1 remote directory

You cannot do this with just WinSCP script. You have to create script in some scripting language that creates WinSCP script to do the task.
alexanderlim

upload from multiple local directory to 1 remote directory

Hi all,

I am not sure whether this is possible to do. I would like to upload only picture files from multiple local direcotyr into 1 remote directory. For example:

on local, I have:
c:\mypicture\2001\
c:\mypicture\2002\
c:\mypicture\2003\
c:\mypicture\2004\

Inside 2001, 2002, 2003, 2004 I have all my picture files.

I want to upload all those picture files into 1 remote directory. I have created a ftp login account that will login to the remote directory that I want to upload those picture files to.

So far this is what I have but it does not seems to work.

"C:\Program Files\WinSCP\WinSCP.exe" /script="C:\ftp_auto.txt"

ftp_auto.txt:

open test
option batch on
option confirm off
option include *.bmp;*.jpg;*.gif;*.png
synchronize remote "c:\mypicture\*\" "/"
exit

After upload, the remote directory should have:
picture1.jpg
picture2.jpg
picture3.jpg
picture4.jpg

No subdirectories under this directory should be created. Meaning that I do not want to have:
2001\picture1.jpg
2001\picture2.jpg
2002\picture3.jpg
2002\picture4.jpg

If inside directory 2001 and 2002 contain files with the same name, then only the latest one should be copied to the remote directory.

Any help would be greatly appreciated.

Thanks.

Regards,
AL