Topic "Unable to download the file to a local directory."

Author Message
[View user's profile]

Joined: 2010-07-06
Posts: 2
Hi All,

We recently started using Winscp and based on the sample scripts available at, we have coded the following script to pull the file from one of our vendors

option batch on
option confirm off
open sftp://<<user>>@<<server>>:22 -privatekey=<<private key>>
get "some file.*" E:\DATA\WorkingFiles\folder

After this, I'm running the above script using


When I look into the logs, everything seems to be right. But why trying to download I see following statements

> 2010-07-12 17:23:56.272 Type: SSH_FXP_CLOSE, Size: 13, Number: 2052
. 2010-07-12 17:23:56.272 File: "/account/some file.100712154715"
. 2010-07-12 17:23:56.272 Copying "/account/some file.100712154715" to local directory started.
. 2010-07-12 17:23:56.272 Binary transfer mode selected.
* 2010-07-12 17:23:56.272 (ExtException)
. 2010-07-12 17:23:56.272 Asking user:
[b]. 2010-07-12 17:23:56.272 'E:\DATA\WorkingFiles\folder' is not file! ()
* 2010-07-12 17:23:56.272 (EScpSkipFile) 'E:\DATA\WorkingFiles\folder' is not file!
. 2010-07-12 17:23:56.272 Closing connection.
. 2010-07-12 17:23:56.272 Sending special code: 12
. 2010-07-12 17:23:56.272 Sent EOF message

From the logs I see that it is waiting on confirmation from the user if that is a folder or a file and then exiting. How do I mention that it is a folder not a file through some parameters. If there are no such parameters existing, is there any modification I need to make to the script to have this working for me.

Your earliest response is appreciated. Thanks
[View user's profile]

Joined: 2010-07-06
Posts: 2
Can anybody provide me some thoughts Idea on this ? Please Smile
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
You need to add trailing backslash to the destination folder path.
Martin Prikryl

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License