EldoS | Feel safer!

Software components for data protection, secure storage and transfer

RequestAttributes SFTP

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#28148
Posted: 01/27/2014 08:33:42
by Stalin Vinces (Standard support level)
Joined: 08/08/2011
Posts: 7

Hi

I'm using this class SBSimpleSftp.TElSimpleSFTPClient

I'm using this method (RequestAttributes) to retrieve the size of a file that I've already transfer. The process is simple, I take the file from the origin then I put it in a intermediate folder (to process it if it is neccesary) and finally I put it into the destination folder.

What I'm trying to do is take the file size in the origin, in the midpoint and at the final.

Imagine the file is: file.txt. The path in the origin is something like /C/SFTP/INPUT/ the midpoint is a larger path, for example C:/REPOSITORY/TRANSMITION/143/11111111/ and the final is /C/SFTP/OUT/.

The process of transfering a file between those path is OK. Even I can determine the size of the file at the origin (/C/SFTP/INPUT) with an object of the class SBSftpCommon.TElSftpFileAttributes. But when I try to retrieve the size of the file C:/REPOSITORY/TRANSMITION/143/11111111/ an exception is thrown "The file path doesn't exist or is invalid" but the path exists and the file is in the directory so is strange.

Is probabbly the format of the path? Could you please tell me what might be the problem.
#28149
Posted: 01/27/2014 08:44:29
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Quote
But when I try to retrieve the size of the file C:/REPOSITORY/TRANSMITION/143/11111111/ an exception is thrown

Do I understand right that you are trying to use TElSftpFileAttributes with a local file?
#28150
Posted: 01/27/2014 08:52:25
by Eugene Mayevski (EldoS Corp.)

Please show the *exact* method call and the *exact* values of parameters you pass.


Sincerely yours
Eugene Mayevski
#28151
Posted: 01/27/2014 09:36:42
by Stalin Vinces (Standard support level)
Joined: 08/08/2011
Posts: 7

Hi,

Thanks to both of you. I explain what happens. First with a SFTP connection I download the file from the origin and put into a intermediate destination which is a local path (to convert it for example DOS2UNIX o UNIX2DOS) and then I upload into the final destination via SFTP.

For security policy, I need to have a log of what is the file size at the origin, at the mid point and at the end to make sure the file is passed OK.

The exact method call is:

Code
Dim lv_AtributosArchivo As New SBSftpCommon.TElSftpFileAttributes
...

lv_SftpClient.RequestAttributes(_t & f, False, lv_AtributosArchivo)


where _t is C:\App\App_Repository\DirTmp\237\635264150042296584\
and f is the name of the file BB_20131031.txt

I looked for the directory and the file and it exists. But is strange because sometimes it works and sometimes doesn't.


I think what the previous reply try to say that I don't need to use the TElSimpleSFTPClient class to retrieve the size of a local file?

Because it doesn't have any trouble when I use it to retrieve the size on the origin nor the final.
#28152
Posted: 01/27/2014 09:46:14
by Eugene Mayevski (EldoS Corp.)

Quote
svinces wrote:
I think what the previous reply try to say that I don't need to use the TElSimpleSFTPClient class to retrieve the size of a local file?


Of course the component works with the remote paths only. You can NOT use its methods to work with the local filesystem (besides, obviously, UploadFile* and DownloadFile* methods).


Sincerely yours
Eugene Mayevski
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 724 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!