> On Tue, 22 Apr 2008, anonymous anonymous wrote:
> 
>> I'd like to ask if there is any way to change the timestamp of directories 
>> under DOS/Win.
>> 
>> I'm writing a small command-line utility for file/dir manipulations. The 
>> only unit I've used is "sysutils". It has "fileage" and "filesetdate". Under 
>> DOS, these functions work well for files, but not for directories. However, 
>> they
>> produce no problem under Linux.
>> 
>> I guess this problem may be due to different OS designs, but I'd like to 
>> have the functions work under DOS/Win.
> 
> I've never seen a call to set the time stamp of a directory under
> DOS/Windows, it may simply not be supported under these OSes.
> 
> Michael.

Thank you for your information.

The need for such a function arises in making "exact" copies of directory 
trees. Windows Explorer can copy directory trees, but it has a number of 
problems such as :
1. directory timestamps are changed to the creation date/time;
2. all the target files have the "archive" attribute set (only Win98 preserves 
file attributes);
3. in some occasions the timestamps of the target files are changed a little 
bit so that Win Exp does not show the difference (in seconds) but some 
directory comparison softwares can detect the change.

In view of these problems, I'm thinking of rewriting the "xcopy" command. The 
problems 2 & 3 are solved, but I can't get a way to solve problem 1.

_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to