Topic "Cant get Attributes of file -> getFiles and Put files error"

Author Message
vishnr
[View user's profile]

Joined: 2013-05-03
Posts: 3
Hi

I have 2 issues.

1. I am fetching files from FTP server and i get the following error message
Can't get attributes of file '/Cont/Care/DCN-2013119Z0000119.pdf'.

session.GetFiles("/Cont/Care/DCN-2013119Z0000119.pdf", "p:\FT Files\DCN-2013119Z0000889.pdf").Check()

But the file has been successfully downloaded. I am getting this issues not every time but most of the times.


2. While transferrinf files from my local machine to remote server path the code is shown below

transferResult = session.PutFiles("P:\FT Files\Outbound\DCN-2013119Z0000119.pdf", "/Cont/Care/DEV/IN/", False, transferOptions)

i. Nothing happens no exception, file transfer does not happen.

ii. Some times the file gets tranferred.

iii. i also get an exception Folder does not exist sometimes.

All the above 3 happen randomly. I have been given the following permissions rwxr-x---

Could you please tell me if these are bugs in the current system. What shold i do in these 2 cases.

Last edited by vishnr on 2013-05-06 11:36; edited 1 time in total
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Please set Session.SessionLogPath and attach log for both scenarios.
_________________
Martin Prikryl
vishnr
[View user's profile]

Joined: 2013-05-03
Posts: 3
prikryl wrote:
Please set Session.SessionLogPath and attach log for both scenarios.


Hi can u tell me how to set this path.

I am getting an exception "session is already opened".

This is my code

With sess
.Protocol = Protocol.Sftp
.HostName = "-------"
.UserName = "-------"
.Password = "-------"
.SshHostKeyFingerprint = "ssh-rsa 2048 00:00:00:00:00:00:a7:31:a4:4a:b0:37:61:6c:5e"
' .ses()
End With
Using session As Session = New Session
' Connect
session.Open(sess)
session.SessionLogPath = "P:\FT Files\" -This is where i m getting th error ' Upload files
Dim transferOptions As New TransferOptions
transferOptions.TransferMode = TransferMode.Binary
End Using
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
You can to set .SessionLogPath before calling .Open.
_________________
Martin Prikryl
vishnr
[View user's profile]

Joined: 2013-05-03
Posts: 3
prikryl wrote:
You can to set .SessionLogPath before calling .Open.


Thanks for the reply. Have put this on hold currently.

By the way how can i move files from one remote directory to another. From /Remote/Folder1/ to /Remote/Folder2.
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