Topic "Putting multiple files on FTP Server"

Author Message
noochi01
[View user's profile]

Joined: 2013-12-20
Posts: 9
Location: USA
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
This should do: put * -delete
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License