TZF - Changing Directory's DateStamp (Not Topaz)

Eitan Gilboa <[email protected]> Sun, 20 Jul 2003 22:32:41 +0200
Newsgroups gmane.comp.lang.delphi.topaz
Message-ID <[email protected]>
Hi all,

When copying large directory structures from one disk to the other, all the
newly created directories get their true creation date (i.e. NOW <g>). My
"filing" system in three cases involve being able to look at the directories
sorted on their dates, so after such copies, it is a great hassle to re-date
all of them "manually".

I looked around (Internet) for solutions, but found none. Amazing, isn't it.

In short, what I want is a program that recurses a directory tree, scanning
each <DIR> for the youngest (mose recent) file in it, and giving the
directory this exact date-time. Sounds simple, doesn't it... The only way to
do that, that I did find, but am unable to use for the moment for lack of
understanding, is by using "FileCreate", like so:


    f:=CreateFile(dirname,
      GENERIC_WRITE, FILE_SHARE_READ or FILE_SHARE_WRITE,
      nil, OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL or
FILE_FLAG_BACKUP_SEMANTICS,0);
    if (f<>invalid_handle_value) then begin
        setfiletime(f,nil,nil,@newfiletime);
      CloseHandle(f);
    end;

If anybody has the sources of a similar solution, or can help, I would be
delighted.

Best wishes,

Eitan.
URL: http://perso.wanadoo.fr/eitang

--^----------------------------------------------------------------
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]

TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
--^----------------------------------------------------------------