Option failonnomatch not working with filemask switch
Version is 5.7.3 (Build 5438)
The problem did not originate with upgrade. This is the first time using this feature.
OS is Windows 7 Enterprise
Transfer protocol is SFTP
I am using scripting.
I do not get any errors.
I expect WinSCP to report no match in the event a .835 file newer than one day is not found and return a non-zero exit code however it returns success. Removing the filemask switch causes the script to report no match if there are no .835 files. I need to know if there is a match newer than one day or not.
Here is the command line:
winscp.com /ini=nul /script=scriptFile /xmllog=logFile
Here is the script:
option batch on
option failonnomatch on
open sftp://user:password@sftp.server.com/ -hostkey="ssh-dss 1024 bb:e6:a2:bc:57:02:f6:38:85:6d:ca:b3:5a:f6:35:91"
get -filemask=">1D" "/835s/*.835" c:\users\username\desktop\
This is what I see running these commands in the console:
C:\Users\username>winscp.com
winscp> option batch on
batch on
reconnecttime 120
winscp> option failonnomatch on
failonnomatch on
winscp> open sftp://user:password@sftp.server.com/ -hostkey="ssh-dss 1024 bb:e6:a2:bc:57:02:f6:38:85:6d:ca:b3:5a:f6:35:91"
Searching for host...
Connecting to host...
Authenticating...
Using username "user".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Session started.
Active session: [1] user@sftp.server.com
winscp> get -filemask=">1D" "/835s/*.835" c:\users\username\desktop\
winscp>
The problem did not originate with upgrade. This is the first time using this feature.
OS is Windows 7 Enterprise
Transfer protocol is SFTP
I am using scripting.
I do not get any errors.
I expect WinSCP to report no match in the event a .835 file newer than one day is not found and return a non-zero exit code however it returns success. Removing the filemask switch causes the script to report no match if there are no .835 files. I need to know if there is a match newer than one day or not.
Here is the command line:
winscp.com /ini=nul /script=scriptFile /xmllog=logFile
Here is the script:
option batch on
option failonnomatch on
open sftp://user:password@sftp.server.com/ -hostkey="ssh-dss 1024 bb:e6:a2:bc:57:02:f6:38:85:6d:ca:b3:5a:f6:35:91"
get -filemask=">1D" "/835s/*.835" c:\users\username\desktop\
This is what I see running these commands in the console:
C:\Users\username>winscp.com
winscp> option batch on
batch on
reconnecttime 120
winscp> option failonnomatch on
failonnomatch on
winscp> open sftp://user:password@sftp.server.com/ -hostkey="ssh-dss 1024 bb:e6:a2:bc:57:02:f6:38:85:6d:ca:b3:5a:f6:35:91"
Searching for host...
Connecting to host...
Authenticating...
Using username "user".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Session started.
Active session: [1] user@sftp.server.com
winscp> get -filemask=">1D" "/835s/*.835" c:\users\username\desktop\
winscp>