Click here to Skip to main content
12,254,453 members (61,446 online)
Click here to Skip to main content
Add your own
alternative version


77 bookmarked

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

, 15 Jul 2009 CPOL
Rate this:
Please Sign up or sign in to vote.
A simple utility to change a file - or multiple files - "Modified" time.



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


  • 15 July 2009 - Added ability to set file times relative to the original file's time. Also compiles in VC9.


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


About the Author

Chris Maunder
Founder CodeProject
Canada Canada
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.

You may also be interested in...

Comments and Discussions

AnswerVisual Strudio deployment bug Pin
paul kompin8-Jun-12 10:27
memberpaul kompin8-Jun-12 10:27 
GeneralRe: Visual Strudio deployment bug Pin
Chris Maunder11-Jun-12 16:23
adminChris Maunder11-Jun-12 16:23 
GeneralThis is exactly the tool... Pin
LastZolex11-Mar-10 1:02
memberLastZolex11-Mar-10 1:02 
GeneralJust sayin' thanks Pin
paul curthoys28-Dec-09 13:19
memberpaul curthoys28-Dec-09 13:19 
GeneralMissing afxpriv.h Pin
BrianCharles20-Jul-09 8:45
memberBrianCharles20-Jul-09 8:45 
Generaloffset the timestamp using original value ... Pin
Gert3d15-Jul-09 2:34
memberGert3d15-Jul-09 2:34 
GeneralRe: offset the timestamp using original value ... Pin
Chris Maunder15-Jul-09 3:32
adminChris Maunder15-Jul-09 3:32 
GeneralRe: offset the timestamp using original value ... Pin
Gert3d15-Jul-09 4:02
memberGert3d15-Jul-09 4:02 
GeneralRe: offset the timestamp using original value ... Pin
Chris Maunder15-Jul-09 4:49
adminChris Maunder15-Jul-09 4:49 
GeneralRe: offset the timestamp using original value ... Pin
Gert3d15-Jul-09 21:28
memberGert3d15-Jul-09 21:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160426.1 | Last Updated 15 Jul 2009
Article Copyright 2002 by Chris Maunder
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid