Topic "script returns exit code 0 when No file matching"

Author Message
[View user's profile]

Joined: 2016-03-29
Posts: 3
Location: Hyderabad,India
Script is in place to ftp the file if the pattern of the file is matched.

When there is no file aswell the script exits with exit code 0

Script: No file matching '*.zip' found.
Script: exit
Script: Exit code: 0
Disconnected from server

Can we the exit code be changed to 1 or any other code if the file is not found.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26911
Location: Prague, Czechia
Use option failonnomatch on

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License