How to get files starting specific name? I have script like this
open [email protected]
get -neweronly "/Payload/Daily/2017/Daily_Payload_BH_2*.csv" "D:\FTP-NSQM\2_Payload"
get -neweronly "/Payload/Daily/2017/Daily_Payload_BH_3*.csv" "D:\FTP-NSQM\3_Payload"
I used batch file for execute this script, but nothing happened
If i don't use a specific name (Daily_Payload_BH_2*.csv or Daily_Payload_BH_3*.csv) for get a new files
get -neweronly "/Payload/Daily/2017" "D:\FTP-NSQM\2_Payload"
This script executed properly
Your code is ambiguous.
To get comparable results use:
get -neweronly "/Payload/Daily/2017/Daily_Payload_BH_2*.csv" "D:\FTP-NSQM\2_Payload\"
get -neweronly "/Payload/Daily/2017/Daily_Payload_BH_3*.csv" "D:\FTP-NSQM\3_Payload\"
and
get -neweronly "/Payload/Daily/2017/*" "D:\FTP-NSQM\2_Payload\"
These should get you consistent results.
Note the /*
in source paths and the trailing backslash in target paths.
Excerpts from get
command documentation (emphasis mine):
Filename can be replaced with wildcard to select multiple files. To download all files in a directory, use mask
*
.The last parameter specifies target local directory and optionally operation mask to store file(s) under different name. Destination directory must end with backslash.
If this does not help, we need to see complete log files of both scripts.