Simple Get Not Working

Advertisement

ansonee
Joined:
Posts:
5
Location:
Minneapolis, MN USA

Simple Get Not Working

I am doing a pretty straight forward GET in a script. I'm just looking for a certain file name structure and then downloading all files that match. I want to maintain the file name in the destination directory. Here's the script:

get -resumesupport=off "./out/extract_CES_SAE_v2_p006320452r3*.txt.pgp" """G:\SAE\Daily SAE File\*"""

However, when I run the script, it errors with the following message:
2018-05-04 10:50:19.001 The filename, directory name, or volume label syntax is incorrect
. 2018-05-04 10:50:19.001 Asking user:
. 2018-05-04 10:50:19.001 Can't create file '"G:\SAE\Daily SAE File\extract_CES_SAE_v2_p006320452r3_20180503174838.txt.pgp%22'. ("System Error. Code: 123.

. 2018-05-04 10:50:19.001 The filename, directory name, or volume label syntax is incorrect")
< 2018-05-04 10:50:19.001 Script: Can't create file '"G:\SAE\Daily SAE File\extract_CES_SAE_v2_p006320452r3_20180503174838.txt.pgp%22'.
< 2018-05-04 10:50:19.001 Script: System Error. Code: 123.

< 2018-05-04 10:50:19.001 The filename, directory name, or volume label syntax is incorrect
> 2018-05-04 10:50:19.001 Type: SSH_FXP_CLOSE, Size: 10, Number: 1796
* 2018-05-04 10:50:19.001 (EScpSkipFile) Can't create file '"G:\SAE\Daily SAE File\extract_CES_SAE_v2_p006320452r3_20180503174838.txt.pgp%22'.

I have no idea why WinSCP is attempting to append that %22 to the file name.
The directory I'm writing to is wide open as far as permissions are concerned.
Am I missing some kind of switch?
I'm new to WinSCP and scripting, so I apologize if this is a simple question, but can't seem to find a resolution on my own.
Thank you!

Reply with quote

Advertisement

PyrateKing
Guest

Simple Get Not Working

I'm guessing that the %22 is the ascii encoding for a double quote. My first thought is to get rid of the triple double quotes you have before and after G:\SAE\Daily SAE File\*. Try "G:\SAE\Daily SAE File\*" (only 1 set of double quotes) and see if that works for you.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,517
Location:
Prague, Czechia

Re: Simple Get Not Working

You have too many quotes in your command. This should work:

get -resumesupport=off "./out/extract_CES_SAE_v2_p006320452r3*.txt.pgp" "G:\SAE\Daily SAE File\*"

Reply with quote

Advertisement

You can post new topics in this forum