Setting modify time for a file.

I am trying to change the modified time of a file using the method "SetModifyTimeAsDate". The time of the file is changed on the server, however there is some diffrence between the time set and actual time of the file on the server. Can anyone assist with this?

Also I am not able to find details in the help file on how we can use the method "SetModifyTime" so can someone please provide a sample which specifies how I can set the exact time to the file. My application is in

What is your license key id?

I am using the evaluation version for testing.

For technical support we usually ask clients to purchase a license.

We just purchased the library, the key id is 400135631

Are you passing the time in UTC to the function?

Yes, the time is passed in UTC.. Can you please provide a sample on how to use "SetModifyTime"

Try something like this:
long filetime = DateTime.Now.ToFileTime();
_ftp.SetModifyTime(file, filetime);

I tried to use above code but the method _ftp.SetModifyTime accepts second parameter as "sfFTPLib._FILETIME" and not in the long format.

Please give me another solution.

The native FILETIME type should be imported as long by .NET. You may need the new tlbimp2 tool:
TlbImp2.exe from

Alternatively just fill the long value into the sfFTPLib._FILETIME struct.