Login  
Search All Forums
Dart Home | PowerTCP FTP for ActiveX | Custom Development Reply | PowerTCP FTP for ActiveX Topics | Forums   
AuthorForum: PowerTCP FTP for ActiveX
Topic: Last Date Modified Stamp
smanners
simon.manners@soesoft.com

From: Chudleigh, Tasmania, Australia
Posts: 38
Member Since: 04/12/04
posted April 12, 2004 10:22 PM

G'day,

I am looking at using my FTP (dart) client and server application to create a file replication tool. Essentially I want to look at a source and target last date/time modified and only copy the file if the source and target date/time do not match.

This gives me two problems:

1. If I replicate the file to the target how do I reset the target file's last modified date/time stamp to the source's date/time.

2. What's the best was to do the initial comparison.

I currently have some standard file copy code that does this no worries, I was hoping the FTP control could do this for me.

Any ideas?

Cheers
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 12, 2004 10:26 PM

For question 1, what OS is the server? Or was it written using our FTP server control?

I don't understand what you are asking in question 2, please rephrase.
smanners
simon.manners@soesoft.com

From: Chudleigh, Tasmania, Australia
Posts: 38
Member Since: 04/12/04
posted April 12, 2004 10:32 PM

1. I am using a your FTP server and client. I have essentially taken the client code and modified for my own purposes.

2. Well I initially need to retrieve the last modified date/Time stamp on both the source and target file so I can do a comparison. If they dont match then I can replicate the file. Once replicated I need to reset the last modified date/time stamp at the target. If you dont then obviously the next time you do a replication the date/time stamp on the source and target wont match and it will simply replicate the file again.

Cheers
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 12, 2004 10:49 PM

I would use the events that fire after the transfer completes to modify the file. The sample shows how to log the completion to the listview so that should be enough to show you where to do it. The "How to do it" part is a different story. You'll have to use some sort of API function to set the attributes of the file. I know there is one in VB but I don't recall the exact name of it.

smanners
simon.manners@soesoft.com

From: Chudleigh, Tasmania, Australia
Posts: 38
Member Since: 04/12/04
posted April 12, 2004 10:52 PM

Its called SetFileTime. I was hoping to avoid using the API call to do this but if the FTP control has no interface to provide this functionality then I guess I have to.

Thanks anyway.
Reply | PowerTCP FTP for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX