Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Haaksbergen, Netherlands

    Unanswered: Changeing Date/Time properties of Directories


    I'm looking for a script to change the date/time properties of (a list of)directories with the date of the oldest (or newest) file in these directories.
    Can anyone help?


    Wim Venema

  2. #2
    Join Date
    May 2009
    You can write a script around the touch command line tool:
    Touch.exe: Set the timestamp of files to the current time on Windows systems

    The easiest way to do this would be to incorporate it into a batch script, using for, dir (ordered), date and time (to set date/time before calling touch), and finally touch the directory with the first result from the ordered dir output.

    Alternatively, you can use the Windows API/.NET command:
    Setting a folder's date and time. - CodeGuru Forums


  3. #3
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    I suppose you could shell out to good old dos, run a DIR command, ordered by /D date and then send the output to a file and read that file in VB......

    mind you, you could probably do that these days using vbs, instead of using 1980's/90's style dos commands
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts