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

Advertisement

vishnr
Joined:
Posts:
3

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

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Cant get Attributes of file -> getFiles and Put files error

Please set Session.SessionLogPath and attach log for both scenarios.

Reply with quote

vishnr
Joined:
Posts:
3

Re: Cant get Attributes of file -> getFiles and Put files error

martin 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

Reply with quote

martin
Site Admin
martin avatar

Re: Cant get Attributes of file -> getFiles and Put files error

You can to set .SessionLogPath before calling .Open.

Reply with quote

vishnr
Joined:
Posts:
3

Re: Cant get Attributes of file -> getFiles and Put files error

martin 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.

Reply with quote

Advertisement

You can post new topics in this forum