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

Jo_L

Script to loop through files and transfer them individually

HI

I have an existing script (hostftp.bat) that will loop through a series of files and transfer them to a remote ftp site in the correct order (filename with a date stamp).

I need to modify this bat file to now also send these files to a separate FTPS site using WinSCP. The problem that I’m stuck on is that I’m not able to get the WinSCP command to loop through the files as the Windows command does.

For instance the calling code is attached (note the highlighted section is the piece I added to call the WinSCP script)




Hostftp.bat is attached


teagweb.txt is attached, however it’s not working.


I think I need to replicate the send %1 from the hostftp.bat file; however put %1 isn’t doing the trick. If I use “put *.xml”. It will copy all the files but won’t return to calling code to do the next file for hostftp.bat to process.
Any help is greatly appreciated.
Thanks