Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException (General questions)
Puja,
You need to provide absolute paths to files for both, local and remote files. I.e:
ftp1.LocalPath = C: ;
ftp1.RemotePath = /home/user/somefile.txt ;
ftp1.GetFile();or like this:
ftp1.GetFile( C: , /home/user/somefile.txt );
From the code you sent us I see that you're passing wrong values to the component, which causes the error you are receiving.
Regards,
Damba
===================================================================
Thanks. The above suggesation worked. I have another question. Can I put Getfile method in a loop to retrive multiple files from same directory as an example below
sftp1.LocalPath = C:/Data/xyz ;
foreach (string f in filelist)
{
sftp1.RemotePath = /home/abc/ + f;
sftp1.GetFile();
}
Complete thread:
- WeOnlyDo.Exceptions.SFTP.InvalidStateException: In - Puja Mallik, 2008-03-25, 20:36
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 20:40
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 20:54
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 20:55
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 21:01
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 22:31
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 22:39
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-26, 19:56
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - woddrazen, 2008-03-26, 20:02
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-26, 20:10
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - woddrazen, 2008-03-26, 20:14
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-26, 20:10
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - woddrazen, 2008-03-26, 20:02
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-26, 19:56
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 22:39
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 22:31
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 21:01
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 20:55
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 20:54
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 20:40