RewriteFiles Utility

The Problem

This small commandline utility will solve a problem often found when moving Visual C++ projects between computers.

Often I need to take MSVC5 projects with me between different computers. But sometimes, when a project has been moved from one computer to another, strange thing will happen , when you try to compile it.
When the program has been compiled, and you try to execute it  - or for some reasons hit that ol' Build-button, the whole project will recompile, like every file has been changed. This will happen every time you try to compile, even if you do not change a single characte in your sourcefiles.

The problem has something to do with the filedates, that are improperly changed in some way.

The Solution
I have written a small commandline utility, that solves the problem. The only thing this program will do is to open all the original files, move them to another folder, and rewrite them in their original location.

I have not provided the sourcecode for this project, for two reasons:

  • The project is not a typical MFC program, eventhough classes and functions from MFC was used.
  • The sourcecode is really messy, and uncommented, and many of the functions are in small utillity files, I have collected for everyday tasks.

If, however, anybody should be interested in the sourcecode, please mail me, and I will send you a copy.

Usage
Rewritefiles.exe is extremely easy to use:

Fire up a DOS-Window or a NT-commandline, go to the directory with the project giving the problems, and write

Rewritefiles *.* c:\myprojects\project
Rewritefiles *.* c:\myprojects\project\res

Assuming, that your project is located in c:\myprojects\project, and you have some resource files in the subdirectory "res".

There are some other commandline options, that will be shown if you just write RewriteFiles on the commandline, without any parameters.

Download File - 83KB

Date Posted: 05/21/98



Comments

  • RewriteFiles Utility

    Posted by Legacy on 06/29/1999 12:00am

    Originally posted by: Elston Sa

    This happens if you copy the project to the a machine whose date is less than that of the source machine.
    another simple solution could be is just change the date of the destination machine to that of the source (if the date is wrong)

    Reply
  • OK!

    Posted by Legacy on 06/01/1999 12:00am

    Originally posted by: CHENG

    It helps...

    Pls. send me the source code pls..
    I'm interested how u made this one..]

    I'm a beginner , by the way...


    Thanks a lot.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • On-demand Event Event Date: October 29, 2014 It's well understood how critical version control is for code. However, its importance to DevOps isn't always recognized. The 2014 DevOps Survey of Practice shows that one of the key predictors of DevOps success is putting all production environment artifacts into version control. In this webcast, Gene Kim discusses these survey findings and shares woeful tales of artifact management gone wrong! Gene also shares examples of how high-performing DevOps …

  • Live Event Date: December 18, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT The Internet of Things (IoT) incorporates physical devices into business processes using predictive analytics. While it relies heavily on existing Internet technologies, it differs by including physical devices, specialized protocols, physical analytics, and a unique partner network. To capture the real business value of IoT, the industry must move beyond customized projects to general patterns and platforms. Check out this upcoming webcast …

Most Popular Programming Stories

More for Developers

RSS Feeds