Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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: 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" .\
Chris_Tarris

I read a few more forum posts and realised I needed to run the script in the same folder as the .exe. Sorry! Thank you.
Chris_Tarris

[I didn't register before posting. Adding this reply to receive email notifications. Thanks.]
Chris_Tarris

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