Solved

Change directory date & time

Posted on 2000-03-07
8
903 Views
Last Modified: 2013-12-28
I want to change the "Modified" date & time that Windows Explorer shows for a particular directory.  "SetFileTime" works only for files, not directories.

I copied all directories from an old PC to a new one, and all the directories at every level on the new one now show the date of the transfer rather than the date from the old one -- naturally all the file dates/times are as the original PC had them, it's just the directories whose dates are the new ones.

Reason I want the old directory dates is so that I can sort from newest to oldest in the Explorer window.

I could do this manually and tediously for each directory by moving from current location to another temporary one, changing the date/time on the PC, creating the directory name again in the proper location, and then moving all the sub-files from the temporary location back to the newly named directory.  But there are too many directories that this needs to be done for.

Any suggestions?
0
Comment
Question by:plarry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 7

Expert Comment

by:sorgie
ID: 2592762
That may be your only alternative.
0
 
LVL 6

Expert Comment

by:1cell
ID: 2592807
0
 
LVL 6

Expert Comment

by:1cell
ID: 2592813
oops, can't verify that it will work for folders but check
0
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 
LVL 6

Expert Comment

by:1cell
ID: 2592815
actually, just found that it can but only with NT4
0
 
LVL 1

Expert Comment

by:Azerthur
ID: 2593160
That's easy man !
It 's so simple arf !

Store the system date
Set the system date to the date you want
Create a folder
set the system date to the previous one.


makeit.bat
date dd/mm/yy
md Folder
date previousone ( in fact you won't be able to do it in a batch but you can also make a C++ or Pascal prog)
0
 

Author Comment

by:plarry
ID: 2597661
Thanks to all.  Unfortunately, it looks like W98 doesn't give you the option to change folder dates, or to keep the original folder date when you copy from one area to another.  This strikes me as VERY dumb -- after all, why should files keep their dates but folders lose them? -- but that's where we are.

Azerthur's answer is what I said I could do but didn't want to, in the last paragraph of my question.  I guess I'll take this route, and use APL to drive the process.

....larry
0
 

Accepted Solution

by:
glnsoft earned 100 total points
ID: 2608386
Here ya go.

http://users.intermediatn.net/usamax/

Get this program. It's a evaluation copy but it will work for ya. I have tested and it works great. I have always wanted a program like this but havn't really search the web that much. I finally found one.
0
 

Author Comment

by:plarry
ID: 2616884
That does it.  Thanks.

I wish the interface were more direct and readable, and I found that the software changed my current system date and time, but otherwise it worked as promised.

I think I'll write my own utility to copy all directory/subdirectory dates and times from the source computer to the target computer, just to save the long manual input, but this program works great for changing a few files and directories to different date/time and for changing a lot of files to a single date/time.
0

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question