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

kkk wrote:

please use mput command instead of put command

In WinSCP, mput is an alias to put. Both do exactly the same thing.
kkk

please use mput command instead of put command
martin

Re: Putting multiple files on FTP Server

This should do: put * -delete
noochi01

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