Solved

Change directory date & time

Posted on 2000-03-07
8
901 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
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
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
An article on effective troubleshooting
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

830 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