Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

calpekid

Issue Fixed

Hi Martin,

that worked perfectly thank you
martin

Re: File name issue with Script

WinSCP should not ask for overwrite confirmation. Assuming you are using the latest version of WinSCP.

Anyway, to add a date use:
get /*.zip c:\temp\backup-%TIMESTAMP#yyyy-mm-dd%.zip

See https://winscp.net/eng/docs/scripting#timestamp
calpekid

File name issue with Script

Hello,

I am using the below script to download a file everyday:

# Connect to SFTP server using a password
open FTP DETAILS
# Download file
get /*.zip c:\temp\backup.zip
# Exit WinSCP

The problem is that every time I run the file it asks me to overwrite or rename the file as the name already exists.

is it possible to add in a command to automatically add in the date so that it downloads without an issue?

Many Thanks
Ryan