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

Re: Help with Transfer/Sync script.

If you know that there is always only one file in the source directory, you can use the following command to upload the file to a fixed name on the remote server.
put * fixedname

See https://winscp.net/eng/docs/scriptcommand_put
Guest

Re: Help with Transfer/Sync script.

Then I didn't describe it enough, my bad.

The files has a new name everyweek so it doesn't overwrite. it just adds the file.

Like in the picture. I want it to delete/overwrite the old ones.
martin

Re: Help with Transfer/Sync script.

The script will overwrite existing files on remote FTP. Do you have any actual problem?
Woopster

Help with Transfer/Sync script.

open ftp://***************:%********************/
 
lcd \\*********\kfslan\fra_kmd\Tandpleje
cd /
 
put *
exit
 
# Execute the script using a command like:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="C:\writable\path\to\log\WinSCP.log" /ini=nul /script="C:\path\to\script\script.txt"

I have this script that transfers a file every weekend to a 3rd party FTP. Is there anyway that I script can overwrite existing files on remote FTP or delete those already there?

Our user has permissions to delete on the remote FTP.