example for setAttributes
Posted: Mon 13 Aug 2012 11:50
Hello,
I like to change the date of a file after uploaded it to a distant server to preserve to date after uploading (is it the right way to do that ?).
I try :
The date on the server is not changed
Distant server has OpennSSH on Debian
Sending server is Windows 2003
SecureBridgeVersion = '3.00.0.2';
Thanks for your help,
Jean-Michel
I like to change the date of a file after uploaded it to a distant server to preserve to date after uploading (is it the right way to do that ?).
I try :
Code: Select all
SFTP.UploadFile(sF,'/root/' + ExtractFileName(sF), false);
attr.ValidAttributes := [aModifyTime] ;
attr.ModifyTime := DateToSet;
SFTP.SetAttributes('/root/' + ExtractFileName(sF),attr) ;
Distant server has OpennSSH on Debian
Sending server is Windows 2003
SecureBridgeVersion = '3.00.0.2';
Thanks for your help,
Jean-Michel