Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Trying to use wild card in GET

I assume that G:/Scorecard is a directory.
If that's correct, use G:\Scorecard\ (note the slashes, particularly the second).
See https://winscp.net/eng/docs/scriptcommand_get
bavergonzado

Trying to use wild card in GET

Hello,

I'm trying to automate the process of retrieving a file on a daily basis. My script seems to work up to the point of copying the file to the directory I have listed. Below is my script and my log. I'm getting a "is not file!" message. Any assistance is appreciated!

option batch abort
option confirm off
open sftp_login_name:the_password@127.0.0.1
cd /059576/059576_SCRedemption/Redemption
Get FIS_TCM_REDEEM*.txt G:/Scorecard
exit

. 2014-01-29 12:41:09.303 File: "/059576/059576_SCRedemption/Redemption/FIS_TCM_REDEEM.20140127.TXT"
. 2014-01-29 12:41:09.303 Copying "/059576/059576_SCRedemption/Redemption/FIS_TCM_REDEEM.20140127.TXT" to local directory started.
. 2014-01-29 12:41:09.303 Binary transfer mode selected.
* 2014-01-29 12:41:09.303 (ExtException)
. 2014-01-29 12:41:09.303 Asking user:
. 2014-01-29 12:41:09.303 'G:\Scorecard' is not file! ()
< 2014-01-29 12:41:09.303 Script: 'G:\Scorecard' is not file!
* 2014-01-29 12:41:09.304 (EScpSkipFile) 'G:\Scorecard is not file!
. 2014-01-29 12:41:09.304 Script: Failed
. 2014-01-29 12:41:09.304 Script: Exit code: 1
. 2014-01-29 12:41:09.304 Closing connection.
. 2014-01-29 12:41:09.304 Sending special code: 12
. 2014-01-29 12:41:09.304 Sent EOF message