Script to loop through files and transfer them individually

Advertisement

Jo_L
Joined:
Posts:
3

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

teagweb_txt.jpg

hostftp_bat.jpg

calling_code.jpg

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum