Click here to Skip to main content
6,293,171 members and growing! (11,890 online)
Email Password   helpLost your password?
Desktop Development » Files and Folders » General     Intermediate License: The Code Project Open License (CPOL)

Timestamp - A utility to change a files "Modified" time.

By Chris Maunder

A simple utility to change a file - or multiple files - "Modified" time.
VC6Win2K, WinXP, MFC, Dev
Posted:26 Nov 2002
Views:152,589
Bookmarked:42 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
33 votes for this article.
Popularity: 7.27 Rating: 4.79 out of 5
2 votes, 10.0%
1

2

3
2 votes, 10.0%
4
16 votes, 80.0%
5

Sample Image - TimeStamp.gif

Introduction

Working with a team of programmers in different time zones can be fun, but it can also cause major problems when files from different time zones get mixed and matched. The latest update to a new version of a file may have a date earlier than someone elses old version, meaning it won't be recompiled, or, a new file may have a date later than others meaning DevStudio repeatedly wants to recompile everything.

The solution to this is:

  1. Get everyone to set their computer to the same time. This may work for some, but can be extremely inconvenient to others, or
  2. Re-stamp the time on your files before sending them off to your colleagues.

I chose the latter, which meant I had to come up with a way to restamp file times. Enter TimeStamp.

This is as basic a "Touch" program as you'll find. Just enter in the offset in days, hours and minutes (positive will push file times into the future, negative into the past), select your files, then hit "Go". Simple.

Each file selected (either a single file or a complete directory tree) has it's "Last Modified" time set to the current time plus the offset that you choose.

The program remembers the last offset you've set, the last 10 files and directories you've stamped, and it's last screen location.

Thanks to:

  • Chris Losinger - Drop Edit
  • Vladimir Kvashin, Girish Bharadwaj and Lars Klose - Directory picker class
  • Davide Calibro - Flat buttons

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Chris Maunder


Member
Chris is the Co-founder, Administrator, Architect, Chief Editor and Shameless Hack who wrote and runs The Code Project. He's been programming since 1988 while pretending to be, in various guises, an astrophysicist, mathematician, physicist, hydrologist, geomorphologist, defence intelligence researcher and then, when all that got a bit rough on the nerves, a web developer. He is a Microsoft Visual C++ MVP both globally and for Canada locally.

His programming experience includes C/C++, C#, SQL, MFC, ASP, ASP.NET, and far, far too much FORTRAN. He has worked on PocketPCs, AIX mainframes, Sun workstations, and a CRAY YMP C90 behemoth but finds notebooks take up less desk space.

He dodges, he weaves, and he never gets enough sleep. He is kind to small animals.

Chris was born and bred in Australia but splits his time between Toronto and Melbourne, depending on the weather. For relaxation he is into road cycling, snowboarding, rock climbing, and storm chasing.
Occupation: Founder
Company: The Code Project
Location: Canada Canada

Other popular Files and Folders articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 36 (Total in Forum: 36) (Refresh)FirstPrevNext
GeneralUse modified Timestamp for foto-file synchronization Pinmemberjeroen van dael3:12 12 Dec '06  
GeneralAdd 12 hours to *existing* time stamp? Pinmemberrcblanchard4:55 26 Dec '04  
GeneralRe: Add 12 hours to *existing* time stamp? PinmemberThe Chrisman9:02 27 Feb '06  
GeneralRe: Add 12 hours to *existing* time stamp? Pinmemberkwestman7:31 11 Jul '06  
GeneralRe: Add 12 hours to *existing* time stamp? PinmemberPsinewave16:53 20 Aug '06  
Generalchange created date of file? Pinmemberngtrungthanh3:12 14 Apr '04  
GeneralRe: change created date of file? Pinmemberifbn19:05 31 Aug '04  
GeneralRe: change created date of file? Pinmembermeouvn17:42 8 Dec '05  
Generaltimestamp Pinmemberdazzavazza4:09 27 Mar '03  
Generaldirectory's date/time PinmemberPeppe0:06 12 Dec '02  
GeneralAlas useful... PinmemberPierre Couderc7:54 3 Dec '02  
GeneralYou can do this already with an excellent Shell Extension - PropertiesPlus 1.65 Pinmemberme10113:50 2 Dec '02  
GeneralRe: You can do this already with an excellent Shell Extension - PropertiesPlus 1.65 PinmemberPhilippe Lhoste23:31 2 Dec '02  
GeneralRe: You can do this already with an excellent Shell Extension - PropertiesPlus 1.65 Pinsusskajjo14:00 3 Aug '03  
GeneralOh man PinmemberJörgen Sigvardsson15:05 27 Nov '02  
GeneralRe: Oh man PinadminChris Maunder7:17 28 Nov '02  
GeneralA different use of this tool PinsussAnonymously7:45 27 Nov '02  
GeneralRe: A different use of this tool Pinmemberrahtrow3:34 29 May '03  
GeneralDamn fast PinmemberPaul Ingles6:10 27 Nov '02  
GeneralRe: Damn fast PinsitebuilderPaul Watson6:23 27 Nov '02  
GeneralRe: Damn fast PinmemberThomas Freudenberg7:09 27 Nov '02  
GeneralRe: Damn fast PinmemberPaul Ingles7:15 27 Nov '02  
GeneralRe: Damn fast - minor update PinmemberPaul Ingles0:59 29 Nov '02  
GeneralRe: Damn fast - minor update - Version 2 (ish) PinmemberPaul Ingles8:27 29 Dec '02  
GeneralHelpful for timebomb sharewares Pinmember.S.Rod.5:58 27 Nov '02  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 26 Nov 2002
Editor: Genevieve Sovereign
Copyright 2002 by Chris Maunder
Everything else Copyright © CodeProject, 1999-2009
Web18 | Advertise on the Code Project