Topic "Copying files from remote side failed - Can't open file"

Author Message
murrometz
[View user's profile]

Joined: 2015-03-10
Posts: 4
Location: Russia
Hello! I'm trying to automate downloading backups from my server.
I use Task Scheduler in Windows 7.

Code of script
Code:

option batch on
option confirm off
open ftp://...
option transfer binary
get -resume bak.sh С:\backup\new\



What I get
Code:
< 2015-03-10 18:08:35.182 150 Here comes the directory listing.
. 2015-03-10 18:08:35.183 drwx------    4 1003     600          4096 Mar 10 03:18 .
. 2015-03-10 18:08:35.183 drwx------    4 1003     600          4096 Mar 10 03:18 ..
<...>
. 2015-03-10 18:08:35.184 -rw-------    1 1003     600          1342 Mar 08 21:46 bak.sh
<...>
< 2015-03-10 18:08:35.206 226 Directory send OK.
. 2015-03-10 18:08:35.206 Directory listing successful
. 2015-03-10 18:08:35.206 bak.sh;-;1342;2015-03-08T18:46:00.000Z;"1003" [0];"600" [0];rw-------;0
. 2015-03-10 18:08:35.207 File: '/bak.sh' [2015-03-08T18:46:00.000Z] [1342]
. 2015-03-10 18:08:35.207 Copying "/bak.sh" to local directory started.
. 2015-03-10 18:08:35.207 Binary transfer mode selected.
. 2015-03-10 18:08:35.207 Starting download of /bak.sh
> 2015-03-10 18:08:35.208 TYPE I
< 2015-03-10 18:08:35.236 200 Switching to Binary mode.
> 2015-03-10 18:08:35.236 PASV
< 2015-03-10 18:08:35.261 227 Entering Passive Mode (188,225,16,121,118,122).
. 2015-03-10 18:08:35.261 Can't open file 'С:\backup\new\bak.sh'.
. 2015-03-10 18:08:35.261 Copying files from remote side failed.
* 2015-03-10 18:08:35.261 (ExtException) **Can't open file 'С:\backup\new\bak.sh'.**
* 2015-03-10 18:08:35.261 Copying files from remote side failed.
. 2015-03-10 18:08:35.261 Asking user:
. 2015-03-10 18:08:35.261 Error transferring file '/bak.sh'. ("Can't open file 'С:\backup\new\bak.sh'.","Copying files from remote side failed.")
< 2015-03-10 18:08:35.261 Script: Error transferring file '/bak.sh'.
< 2015-03-10 18:08:35.262 Script: Can't open file 'С:\backup\new\bak.sh'.

< 2015-03-10 18:08:35.262 Copying files from remote side failed.
* 2015-03-10 18:08:35.263 (EScpSkipFile) Error transferring file '/bak.sh'.
* 2015-03-10 18:08:35.263 Can't open file 'С:\backup\new\bak.sh'.
* 2015-03-10 18:08:35.263 Copying files from remote side failed.
. 2015-03-10 18:08:35.263 Script: Failed
> 2015-03-10 18:08:35.263 Script: exit
. 2015-03-10 18:08:35.263 Script: Exit code: 1
. 2015-03-10 18:08:35.265 Disconnected from server


The script doesn't create any file.
Is it rights or what ...

Can you help me please! I'm new to winscp scripting and I don't get what's going wrong.
Thank you.
Advertisements
murrometz
[View user's profile]

Joined: 2015-03-10
Posts: 4
Location: Russia
Any help would be appreciated
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
_________________
Martin Prikryl
murrometz
[View user's profile]

Joined: 2015-03-10
Posts: 4
Location: Russia
prikryl wrote:
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.



ok.

Системе не удается найти указанный путь
is translated as
The system cannot find the path specified
log.txt (8.35 KB) Private file

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Does the target path С:\backup\new\ exist? Can the Scheduler account see/access it? Can you do lls С:\backup\new\ before the get?
_________________
Martin Prikryl
murrometz
[View user's profile]

Joined: 2015-03-10
Posts: 4
Location: Russia
prikryl wrote:
Does the target path С:\backup\new\ exist? Can the Scheduler account see/access it? Can you do lls С:\backup\new\ before the get?


Thank you for your help!

Yes, i confused cyrillic С and latin C. They are on the same key on the keyboard.

Thank you for your program!
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