Solved

Change directory date & time

Posted on 2000-03-07
8
897 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
8 Comments
 
LVL 7

Expert Comment

by:sorgie
Comment Utility
That may be your only alternative.
0
 
LVL 6

Expert Comment

by:1cell
Comment Utility
0
 
LVL 6

Expert Comment

by:1cell
Comment Utility
oops, can't verify that it will work for folders but check
0
 
LVL 6

Expert Comment

by:1cell
Comment Utility
actually, just found that it can but only with NT4
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Expert Comment

by:Azerthur
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Join & Write a Comment

A few months ago I had an issue with LaserJet 1020 printer which was installed to XP and Windows 7.  It was installed to XP and working, but when I tried to connect from a Windows 7 PC, it would attempt connection and then fail.  Sometimes the Spool…
The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now