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

savoyard37

Great, it works.

thanks for your fast and comprehensive answer.

Best regards
martin

Re: Comand MPUT -Delete how to

If you check the script output, it should say:
Selecting files using a path ending with slash is ambiguous. Remove the slash to select the folder. Append * mask to select all files in the folder.

And that's your problem.
See also https://winscp.net/eng/docs/scriptcommand_put#remarks
The correct syntax is:
put -delete C:\QxxxuadientFTP\aims_depot\* -filemask=*.jaf /FromGMC/

Or
put -delete C:\QxxxuadientFTP\aims_depot\*.jaf /FromGMC/

Note that I'm using put, as mput is just an alias.
savoyard37

Comand MPUT -Delete how to

Hi support ,

We are trying to us the WinSCP scripting to copy files from local to FTP server.
It work fine but if add -delete, it delete files and local folder too.

script is here:
# Automatically abort script on errors
option batch abort
 
# Disable overwrite confirmations that conflict with the previous
option confirm off
 
# Logging Session
#/log=c:\QxxxFTP\logs-to-as.log
 
# Connect to FTP server using a password
open ftp://user:password@IPADRESS
 
# Download file
mput C:\QxxxuadientFTP\aims_depot\ -filemask=*.jaf /FromGMC
 
# Disconnect
close
 
# Exit WinSCP
exit

Thanks for assist.
LC