Topic "Issue with error Cant Get Attributes of a file.."

Author Message
saipaan
[View user's profile]

Joined: 2013-01-31
Posts: 1
Location: MONTREAL
I am getting the error below::

Can't get attributes of file 'filename.xml'.
No such file or directory.
Error code: 2
Error message from server: /data/filename.xml is not a valid file path
Request code: 7

Here is the script:

REM Get today's date
for /f "tokens=2,3,4 delims=/ " %%a in ('date /t') do set filedate=%%c%%a%%b
for /f "tokens=2,3,4 delims=/ " %%a in ('date /t') do set filedate2=%%c-%%a-%%b

REM Set variables
Set LocalPath=D:\Location of folder
Set File2Get1=filename_%filedate2%.xml


REM =========== START SCRIPT ==========

REM ----------- PROCESS FILE2GET1 ----------
IF EXIST D:\location\%File2Get1% (
echo D:\location\%File2Get1% exists >> d:\location\Log.log
GOTO RECEIVED1
)


REM Set a few variables

set PARAM=d:\location\file.txt

echo option batch abort>>%PARAM%
echo option confirm off>>%PARAM%
echo open winscp>>%PARAM%
echo dir >>%PARAM%
echo Get %File2Get1%>>%PARAM%
echo close>>%PARAM%
echo exit>>%PARAM%

echo Start : %TODAY% >> d:\location\Log.log
time /t >> d:\location\Log.log


"C:\program files\winscp\winscp.com" /script=%PARAM% >>d:\location\Log.log
echo - >> d:\location\Log.log
IF EXIST D:\location\%File2Get1% (
echo D:\location\%File2Get1% retrieved >> d:\location\Log.log
)


:RECEIVED1
echo ----------------------------------- >> d:\location\Log.log
date /t >> d:\location\Log.log
time /t >> d:\location\Log.log
echo *********************************************************** >> d:\location\Log.log
echo. >> d:\location\Log.log
echo. >> d:\location\Log.log
echo. >> d:\location\Log.log

echo END Transfert >> d:\location\Log.log
echo ____________________________________________________ >> d:\location\Log.log
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. 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 may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
_________________
Martin Prikryl
Guest




. 2013-02-01 05:50:01.406 --------------------------------------------------------------------------
. 2013-02-01 05:50:01.406 WinSCP Version 5.1.2 (Build 2816) (OS 5.2.3790 Service Pack 2)
. 2013-02-01 05:50:01.406 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2013-02-01 05:50:01.406 Local account:
. 2013-02-01 05:50:01.406 Working directory:
. 2013-02-01 05:50:01.406 Command-line: "C:\program files\winscp\WinSCP.exe" /console=512 /consoleinstance=_5324_736 "/script=d:\Users\OCC\TEST\ftp_OCC_NBFTRD.txt"
. 2013-02-01 05:50:01.406 Time zone: Current: GMT-5, Standard: GMT-5, DST: GMT-4, DST Start: 3/10/2013, DST End: 11/3/2013
. 2013-02-01 05:50:01.406 Login time: Friday, February 01, 2013 5:50:01 AM
. 2013-02-01 05:50:01.406 --------------------------------------------------------------------------
. 2013-02-01 05:50:01.406 Session name: OCC (Stored session)
. 2013-02-01 05:50:01.406 Host name:
. 2013-02-01 05:50:01.406 User name:
. 2013-02-01 05:50:01.406 Tunnel: No
. 2013-02-01 05:50:01.406 Transfer Protocol: SFTP (SCP)
. 2013-02-01 05:50:01.406 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2013-02-01 05:50:01.406 Proxy: none
. 2013-02-01 05:50:01.406 SSH protocol version: 2; Compression: No
. 2013-02-01 05:50:01.406 Bypass authentication: No
. 2013-02-01 05:50:01.406 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2013-02-01 05:50:01.406 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2013-02-01 05:50:01.406 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2013-02-01 05:50:01.406 SFTP Bugs: A,A
. 2013-02-01 05:50:01.406 Return code variable: Autodetect; Lookup user groups: A
. 2013-02-01 05:50:01.406 Shell: default
. 2013-02-01 05:50:01.406 EOL: 0, UTF: 2
. 2013-02-01 05:50:01.406 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2013-02-01 05:50:01.406 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2013-02-01 05:50:01.406 Local directory:
. 2013-02-01 05:50:01.406 Cache directory changes: Yes, Permanent: Yes
. 2013-02-01 05:50:01.406 DST mode: 1
. 2013-02-01 05:50:01.406 --------------------------------------------------------------------------
. 2013-02-01 05:50:01.421 Looking up host "198.133.169.198"
. 2013-02-01 05:50:01.421 Connecting to 198.133.169.198 port 10022
. 2013-02-01 05:50:01.531 Server version: SSH-2.0-Maverick_SSHD
. 2013-02-01 05:50:01.531 Using SSH protocol version 2
. 2013-02-01 05:50:01.531 We claim version: SSH-2.0-WinSCP_release_5.1.2
. 2013-02-01 05:50:01.593 Doing Diffie-Hellman group exchange
. 2013-02-01 05:50:01.828 Doing Diffie-Hellman key exchange with hash SHA-1
. 2013-02-01 05:50:01.984 Verifying host key rsa2
. 2013-02-01 05:50:01.984 Host key matches cached key
. 2013-02-01 05:50:01.984 Host key fingerprint is:
. 2013-02-01 05:50:01.984 ssh-rsa 1023 e9:8a:b6:dd:4d:ad:7b:32:bc:f2:aa:96:24:13:ef:de
. 2013-02-01 05:50:01.999 Initialised AES-256 CBC client->server encryption
. 2013-02-01 05:50:01.999 Initialised HMAC-SHA1 client->server MAC algorithm
. 2013-02-01 05:50:01.999 Initialised zlib (RFC1950) compression
. 2013-02-01 05:50:01.999 Initialised AES-256 CBC server->client encryption
. 2013-02-01 05:50:01.999 Initialised HMAC-SHA1 server->client MAC algorithm
. 2013-02-01 05:50:01.999 Initialised zlib (RFC1950) decompression
. 2013-02-01 05:50:02.218 Reading private key file "C:\Program Files\WinSCP\PuTTY\occftp_new\PrivateKey.ppk"
. 2013-02-01 05:50:02.218 Pageant is running. Requesting keys.
. 2013-02-01 05:50:02.234 Pageant has 1 SSH-2 keys
. 2013-02-01 05:50:02.234 Pageant key #0 matches configured key file
! 2013-02-01 05:50:02.234 Using username "cmo_355".
. 2013-02-01 05:50:02.281 Trying Pageant key #0
! 2013-02-01 05:50:02.374 Authenticating with public key "rsa-key-20130122" from agent
. 2013-02-01 05:50:02.468 Sending Pageant's response
. 2013-02-01 05:50:02.562 Access granted
. 2013-02-01 05:50:02.624 Opened channel for session
. 2013-02-01 05:50:02.984 Started a shell/command
. 2013-02-01 05:50:02.984 --------------------------------------------------------------------------
. 2013-02-01 05:50:02.984 Using SFTP protocol.
. 2013-02-01 05:50:02.984 Doing startup conversation with host.
> 2013-02-01 05:50:02.999 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2013-02-01 05:50:03.062 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2013-02-01 05:50:03.062 SFTP version 3 negotiated.
. 2013-02-01 05:50:03.062 We believe the server has signed timestamps bug
. 2013-02-01 05:50:03.062 We will use UTF-8 strings for status messages only
. 2013-02-01 05:50:03.062 Changing directory to "/data".
. 2013-02-01 05:50:03.062 Getting real path for '/data'
> 2013-02-01 05:50:03.062 Type: SSH_FXP_REALPATH, Size: 14, Number: 16
< 2013-02-01 05:50:03.140 Type: SSH_FXP_NAME, Size: 53, Number: 16
. 2013-02-01 05:50:03.140 Real path is '/data'
. 2013-02-01 05:50:03.140 Trying to open directory "/data".
> 2013-02-01 05:50:03.140 Type: SSH_FXP_LSTAT, Size: 14, Number: 263
< 2013-02-01 05:50:03.203 Type: SSH_FXP_ATTRS, Size: 29, Number: 263
. 2013-02-01 05:50:03.203 Getting current directory name.
. 2013-02-01 05:50:03.203 Startup conversation with host finished.
< 2013-02-01 05:50:03.203 Script: Active session: [1] OCC
> 2013-02-01 05:50:03.203 Script: dir
. 2013-02-01 05:50:03.203 Listing directory "/data".
> 2013-02-01 05:50:03.203 Type: SSH_FXP_OPENDIR, Size: 14, Number: 523
< 2013-02-01 05:50:03.265 Type: SSH_FXP_HANDLE, Size: 31, Number: 523
> 2013-02-01 05:50:03.265 Type: SSH_FXP_READDIR, Size: 31, Number: 780
< 2013-02-01 05:50:03.374 Type: SSH_FXP_NAME, Size: 5126, Number: 780
> 2013-02-01 05:50:03.374 Type: SSH_FXP_READDIR, Size: 31, Number: 1036
< 2013-02-01 05:50:03.437 Type: SSH_FXP_NAME, Size: 1579, Number: 1036
> 2013-02-01 05:50:03.437 Type: SSH_FXP_READDIR, Size: 31, Number: 1292
< 2013-02-01 05:50:03.484 Type: SSH_FXP_STATUS, Size: 40, Number: 1292
< 2013-02-01 05:50:03.484 Status code: 1

> 2013-02-01 05:50:03.499 Script: Get listfile.xml
. 2013-02-01 05:50:03.499 Listing file "listfile.xml".
> 2013-02-01 05:50:03.499 Type: SSH_FXP_LSTAT, Size: 42, Number: 1799
< 2013-02-01 05:50:03.546 Type: SSH_FXP_STATUS, Size: 40, Number: 1540
. 2013-02-01 05:50:03.546 Discarding reserved response
< 2013-02-01 05:50:03.609 Type: SSH_FXP_ATTRS, Size: 29, Number: 1799
. 2013-02-01 05:50:03.609 File: "/data/listfile.xml"
. 2013-02-01 05:50:03.609 Copying "/data/listfile.xml" to local directory started.
. 2013-02-01 05:50:03.609 Binary transfer mode selected.
. 2013-02-01 05:50:03.624 Checking existence of partially transfered file.
. 2013-02-01 05:50:03.624 Opening remote file.
> 2013-02-01 05:50:03.624 Type: SSH_FXP_OPEN, Size: 50, Number: 2051
< 2013-02-01 05:50:03.687 Type: SSH_FXP_HANDLE, Size: 27, Number: 2051
> 2013-02-01 05:50:03.687 Type: SSH_FXP_FSTAT, Size: 27, Number: 2312
< 2013-02-01 05:50:03.749 Type: SSH_FXP_ATTRS, Size: 29, Number: 2312
. 2013-02-01 05:50:03.749 Confirming overwriting of file.
> 2013-02-01 05:50:03.765 Type: SSH_FXP_READ, Size: 39, Number: 2565
< 2013-02-01 05:50:06.203 Status code: 1
. 2013-02-01 05:50:06.203 214 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2013-02-01 05:50:06.203 Type: SSH_FXP_CLOSE, Size: 27, Number: 30468
< 2013-02-01 05:50:06.234 Type: SSH_FXP_STATUS, Size: 32, Number: 29701
< 2013-02-01 05:50:06.265 Type: SSH_FXP_STATUS, Size: 32, Number: 29957
< 2013-02-01 05:50:06.265 Type: SSH_FXP_STATUS, Size: 32, Number: 30213
> 2013-02-01 05:50:06.281 Script: close
. 2013-02-01 05:50:06.281 Closing connection.
. 2013-02-01 05:50:06.281 Sending special code: 12
. 2013-02-01 05:50:06.281 Sent EOF message
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
There is no error in the log.
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