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

StSiotis

Re: Check if file exists before download

i use get command to download a file from a server...But everytime the file doesn't exists i get an error message. So i want to firstly check if the file exists and then use get command to download it!
martin

Re: Check if file exists before download

OK, I've misunderstood the question.

Though it's still confusing. Why are you trying to check a local file before calling WinSCP with upload.txt script, if you are going to download a file?
StSiotis

Re: Check if file exists before download

Sorry i forgot to add my UserName before
Guest

Re: Check if file exists before download

I don't want to use .NET assembly. I have mentioned that in question! I want to use a simple bat file.
StSiotis

Check if file exists before download

Hello,
i want to check if a file exists before download it without using .NET assembly. I try this:
if exist c:\upload\test.txt winscp.com /script=upload.txt
from your documentation at https://winscp.net/eng/docs/guide_automation_conditional#scripting
but it returns an error that command if is not recognized. Could you help me plz?
Thank you!