Exit Code 0 When 0 files are transferred with wildcards

Advertisement

flipman619
Joined:
Posts:
8
Location:
Southern California

Exit Code 0 When 0 files are transferred with wildcards

I have noticed that whenever a wildcard is used in a trasnfer and 0 files are transferred, the return code is 0 (success). However, when trying to transfer the same file without the wildcard, it will return an exit code of 1 (failure) because winscp could not find any files. This seems inconsistent.

Is there anyway to return a failure code of 1 whenever no files match the mask regardless if a wildcard is used or not?

Or is there any option to change this behavior?

-Julius

Reply with quote

Advertisement

flipman619
Joined:
Posts:
8
Location:
Southern California

Re: Exit Code 0 When 0 files are transferred with wildcards

flipman619 wrote:

I have noticed that whenever a wildcard is used in a trasnfer and 0 files are transferred, the return code is 0 (success). However, when trying to transfer the same file without the wildcard, it will return an exit code of 1 (failure) because winscp could not find any files. This seems inconsistent.

Is there anyway to return a failure code of 1 whenever no files match the mask regardless if a wildcard is used or not?

Or is there any option to change this behavior?

-Julius

I have confirmed this occurs with any command that uses the wildcard.

Reply with quote

Advertisement

You can post new topics in this forum