Topic "Errorlevel 0 but no files downloaded!"

Author Message
sumdumgai
[View user's profile]

Joined: 2010-05-21
Posts: 8
My remote server occasionally has no files to download but I can't find any way to trap that condition. Errorlevel for WinSCP returned is zero in my .bat file. I've tried Batch Abort with no luck. I've searched FAQ's. Is there a simple way to check if files are available for download or have been downloaded? I don't have any JAVA scripting experience. I am using WINSCP batch scripting commands. Thanks for your help.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
If you are using a mask (wildcard) to download files, then absence of files is not an error. You may investigate XML log after the script finished to find if any files were downloaded. Use this script for inspiration. Just when looking for files replace "w:file/w:filename" with "w:download/w:filename".
_________________
Martin Prikryl
sumdumgai
[View user's profile]

Joined: 2010-05-21
Posts: 8
Whoa. That's a lot to digest. But I'll study this a bit to try and understand it. Like I said, my scripting experience is very limited. Thanks for your advice.
sumdumgai
[View user's profile]

Joined: 2010-05-21
Posts: 8
Can't figure this out. Does WinSCP create the log file if I add /log option, or do I have to create one (how)? If I need to run a script to create and read the log file, I'm in trouble because I just don't have any JAVA scripting experience. I just want to know if any files were downloaded. Thanks.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
Log file is created if you use the /log option.

You need to use some programming language to interpret the log.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License