Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

vishnr

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

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

You can to set .SessionLogPath before calling .Open.
vishnr

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
martin

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

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

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.