The company’s logo changed…
I have a couple hundred files ( of engineering drawings),which have the old logo drawn in the corner. I want to replace it with the new logo, without changing anything else. But I need keep the files arranged in chronological order, with their original dates.
Is there any way to do open each file today, make a simple change and save the file,but prevent Windows from giving all the files today’s date?
(my computer is a simple PC with Windows XP. I want to be able to use the standard Windows Explorer or “my computer” and click on the column labelled “date modified” to see the files organized chronologically. I can’t use the “date created” option, because the file may have been created 2 years ago but rejected, then modified and approved for final use a year later. I need to see the final date of approval.)
You can use the touch command from the command line to set any of the three timestamps associated with a file. It will be tedious to modify the dates this way after you have made the changes. But unless someone has a better way this will work.
I can’t swear this still works with XP, but back in the old days, you could just change your system date/time to whatever you wanted it to be, do what you needed to do, then change it back.
If the only thing of importance is to be able to sort them in chronological order by date modified, why is it important that that date remain unchanged? Just modify them in the order they are in that list now. The new list will still show them in the right order.
you’re right, gaz, that would be tedious!
I was considering doing the essentially the same thing, by using DOS (typing the command “Date”), but it would be too prone to mistakes if I have to enter each date manually.
I’m wondering if it is possible to write a program that would run in the background, and do it automatically.
Something that would sense whichever file is open currently, read the date attribute of that file, and re-set today’s date on the computer to match. Then when I save the file, it would keep its original date. The PC wouldnt know that today is January 2009; it would think that today is the date of the file.
Then as I open a new file, the PC would re-set its date according to the newly opened file.
Is this possible?
nice idea, KTN, but I need the precise date, in order not to confuse clients
For a long time I have had a program called PropertiesPlus installed and I can right click on a file, select it and modify the timestamps. I use it often but I only do one file at a time. I do not know if it has any ability to handle multiple files.
If the date is important you should put the date in the filename. If you start the filenames with the date in YYYYMMDD format they will sort the way you want them to using an alphabetical sort.
I don’t know your level of computer savy but if is was me I would write a perl script to read the dates and file names and write that data to another file. Then a second script to read the data file and update the timestamps.
Depending on how comfortable you are with the command line, it ought to be possible to do a bunch at once. I’ve used excel in the past to make a list of commands, that when copied and pasted into the command line will run sequentially. So, if you’ve got a list of the dates you need (maybe you can get these from the command line too, dunno) you can start with that column, and then add the TOUCH command and whatnot. Then, copy paste the whole column into the command line.
This is a good question. When you arrange files, the only dated option is “modified.” It would be good to have “date created” as an option, but I don’t know where that is, if it’s in XP.
Why you can’t just use one of the many free “touch” utilities with GUI interfaces?
Just point the touch program to each file (whether with a dialog, by dragging and dropping, whatever) so it will read the existing dates, but don’t hit “save” or “close”. Then, use whatever other program you use to modify and save the file, which will change the dates. Then hit “save” on the touch program, which will set them back to what they were.
I was offline for a while last night (read: bored) and thought about your problem so I decided to whip out a script for it. I used javascript to do it. Here is the result. It just looks at all the files in a specified directory (and, optionally, subdirectories). You use it like this:
The first command looks at the files in the specified directory and writes info about them to the specified “datelist.txt” file (the target directory is specified with -d and the date list file is specified with -f). The -s option means look at subdirectories too.
The second command has the -r option, so it restores the dates, which it reads out of datelist.txt, on the files in the target directory. The paths in the datelist are stored relative to the specified directory, so you can restore the dates onto a different copy of the target directory if you want. You don’t have to specify “-s” on the restore because it automatically does all the files listed in the datelist file.
Notes:
[ol]
[li]This requires “touch.exe”, which can be downloaded from microsoft.com. If you open the script in notepad, there’s a note with the url at the top.[/li][li]Because touch.exe only works on the modification date (not creation date or access date), that’s all that gets restored. However, all 3 dates are stored in the datefile, so if you wanted to, it would be easy to tweak this script to restore all 3 if you had a different ‘touch’ utility.[/li][li]This was written and tested on Windows XP.[/li][/ol]
You might want to consider this as incentive to switch to another method of version control. If date-stamping is important to your project, consider using the date stamp in the filename, e.g., FlowerSpec011509.jpg. You should be able to separate the files by date into separate folders, then do batch renames to append the date stamp, then you can go in and edit any way you want, so long as you don’t change the file name.
Seconded. I held my tongue on this because I have no idea how reasonable it is to suggest you change this system, but using file modification times to mean something other than “last time this file was modified” is kind of a bad idea from a file managment point of view. Consider my script a purely factual answer to a technical question, not a vote for it being the best way.
Hey, If that’s what you can do when you’re bored…
I took 1 semester of programming 20+ years (ahh…Fortran!) So I couldn’t have done it by myself. Thanks again
I don’t rely on the the file modification time—my file names have the version number built in, and the date of approval is always printed within the file itself.
But I deal in construction–and big projects often run for 5 years.
When I need files from several years ago, it is handy to narrow down the directory listing by chronological order, so I don’t need to look thru the whole list. ('Cause , ya know, I’m pretty sure the roof was built after the basement )