Putting multiple files on FTP Server

Advertisement

noochi01
Joined:
Posts:
9
Location:
USA

Putting multiple files on FTP Server

Hi Guys,

Looking for your expertise. I have a script that runs as a batch file, launches WinSCP, calls a separate file, and successfully moves a file to my ftp server. I need to alter this script to move all files within the Internal Server directory such as *.*, but can't get the syntax correct. The files would most likely have different extensions. Any assistance would be greatly appreciated. My scripts are below:

Batch File Contents:
IF EXIST "\\InternalServer\FileShare\FTPFile.txt" (
start "" "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console /script=C:\WINSCP_Test_Scripts_12_22_13\ToFTPServer.txt /log="C:\WINSCP_Test_Scripts_12_22_13\ToFTP.log"
)
else(
)
exit

#############################################################

ToFTPServer.txt Contents:
open sftp://User1:Password@IPAddress
option transfer binary
option confirm off

cd /home/FTPUSer/Userdir/

lcd \\InternalServer\FileShare\

put FTPFile.txt FTPFile.txt -delete

exit


Again, looking for a wild card format with the put command, that way if my end user puts multiple files in this directory, the script will grab all of them and move them to the ftp server.

Thanks in advance everyone!

Mike

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: Putting multiple files on FTP Server

This should do: put * -delete

Reply with quote

Advertisement

You can post new topics in this forum