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

Author Message
RaviCKota
[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 winscp.com, we have coded the following script to pull the file from one of our vendors



Code:

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

After this, I'm running the above script using

E:\APPS\WINSCP\WINSCP\WINSCP.EXE /CONSOLE /SCRIPT=E:\APPS\SCRIPTS\sample.TXT /log="E:\APPS\SCRIPTS\sample.LOG"

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
[/b]


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
[/code]
RaviCKota
[View user's profile]

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

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License