Check file existence

Advertisement

thomasFrh
Joined:
Posts:
2

Check file existence

Hello all,

I try to find out how I can check whether a file exists. If the file not exists I want to send an email (-> backup script):

winscp.com /log=log.log /ini=nul /command ^ "option batch abort" ^ "open ftp://test:test@localhost/" ^ "option failonnomatch on" ^ "ls test.sql" ^ "exit"

if %ERRORLEVEL% neq 0 goto error

:error
echo No file found -> email
pause
exit 1

echo test

My question is how I have to change the script, because of course "ls" does not run... Unfortunately it is not possible to download the file, because the files are very big..

Maybe someone can help me!

Thanks,
Thomas

Reply with quote

Advertisement

thomasFrh
Joined:
Posts:
2

Re: Check file existence

Does anyone have an idea? I still tried a half day to find a way how to check whether the file exists... :(

Reply with quote

Advertisement

You can post new topics in this forum