Setting file attributes after download (wodSFTP / wodSFTP.NET / wodSFTPdll)
Hallo,
would you like to post a code snipped how to set file attributes?
I use following construction:
pFtpCom->GetFile(vLclDir,bstrRemotePath);
// ( c: emp , /ftpfile.txt )
The file can be loadet to c: emp
Now, I would change the file RW Attributes to 0444 , how?
My construct throws an exception: (err=10060, timeout)
pFtpCom->SetAttributes(bstrRemotePath,vtMissing,vtMissing,vtMissing,_bstr_t( 0444 ));
// ( /ftpfile.txt , .... , 0444 )
What is here wrong?
Thanks
Jan
[:smile:]
Re: Setting file attributes after download
Jan,
not sure if you want to change local or remote. If it's local, you need to use API. If you want remote, then SetAttributes is correct way, but instead of 444 as string, send 444oct = 292dec, so set 292 into Permissions argument, and that should work.
However, 10060 doesn't somehow fit into your error range.. Are you sure you got 10060 after SetAttributes call?
Kreso
Re: Setting file attributes after download
Hello Kreso,
this construct works only partially:
long att=292;
pFtpCom->SetAttributes(bstrRemotePath,vtMissing,vtMissing,vtMissing,att);
Remote file becomes attributes properly.
But it throws exception:
10060 (yes!), The current connection has timeout.
Any dea?
Jan
Re: Setting file attributes after download
Jan,
I still dislike that 10060 and I think it shouldn't be happening here. Can you zip and send your project to techsupport@weonlydo.com ? I'd like to check it out.
Re: Setting file attributes after download
Jan,
Can you zip and send your project to techsupport@weonlydo.com ? I'd like to check it out.
Hello,
you have post!
Jan