Differences

This shows you the differences between the selected revisions of the page.

2015-01-29 2015-03-25
better intro (martin) checking for existence of any file matching a mask (martin)
Line 45: Line 45:
echo Error or file %REMOTE_PATH% not exists echo Error or file %REMOTE_PATH% not exists
exit 1 exit 1
 +</code>
 +
 +To check for existence of any file matching a mask, instead of a specific file, enable ''[[scriptcommand_option|option failonnomatch on]]'' mode and use ''[[scriptcommand_ls|ls mask]]'' command, instead of ''stat name'' command:
 +
 +<code batch>
 +set REMOTE_PATH=/home/user/*.txt
 +winscp.com /command ^
 +    "option batch abort" ^
 +    "open mysession" ^
 +    "option failonnomatch on" ^
 +    "ls %REMOTE_PATH%" ^
 +    "exit"
</code> </code>

Last modified: by martin