Query with a simple get script

Advertisement

Chris_Tarris
Guest

Query with a simple get script

Hi there, I am having trouble getting a simple script to run.

Running WinSCP version 5.5.0 (Build 3839) Commander interface on Windows 7. Transfer protocol is SFTP, trying to get a script to run manually.

My .bat file is:

@echo off
winscp.exe /console /script=script.txt

My script.txt is in the same directory as the .bat:

option batch abort
option confirm off
open sftp://user:pass@00.000.000.00
get ""/Email Attachments/File_1.csv"" .\
exit

(I have wrapped the remote path in double quotes due to the space in the folder name.)

When I run the .bat file, the file is not retrieved - nor does anything show up in the log window.

I'm wondering if I've missed a step somewhere.

Thank you in advance for any help you can provide!

Kind regards
Chris

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Query with a simple get script

Also:
1) You should better use winscp.com to avoid additional console window popup for winscp.exe.
2) You should use only single double quotes: get "/Email Attachments/File_1.csv" .\

Reply with quote

Advertisement

You can post new topics in this forum