Differences

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

2016-01-06 2016-01-22
Session.EnumerateRemoteFiles alternative (martin) option anchors (martin)
Line 24: Line 24:
==== [[scripting]] Using WinSCP Scripting ==== ==== [[scripting]] Using WinSCP Scripting ====
-You can use a ''[[scriptcommand_stat|stat]]'' command in the ([[scripting#using_scripting|default]]) ''[[scriptcommand_option|option batch abort]]'' mode to query file attributes. If the file does not exist, the ''stat'' command fails and so does the script. Then, [[scripting#checking_results|test WinSCP exit code]] to determine, if the file exists or not.+You can use a ''[[scriptcommand_stat|stat]]'' command in the ([[scripting#using_scripting|default]]) ''[[scriptcommand_option#batch|option batch abort]]'' mode to query file attributes. If the file does not exist, the ''stat'' command fails and so does the script. Then, [[scripting#checking_results|test WinSCP exit code]] to determine, if the file exists or not.
<code batch> <code batch>
Line 46: Line 46:
</code> </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:+To check for existence of any file matching a mask, instead of a specific file, enable ''[[scriptcommand_option#failonnomatch|option failonnomatch on]]'' mode and use ''[[scriptcommand_ls|ls mask]]'' command, instead of ''stat name'' command:
<code batch> <code batch>

Last modified: by martin