PRODUCT : Borland C++ NUMBER : 1562 VERSION : All OS : DOS/WIN DATE : October 25, 1993 PAGE : 1/4 TITLE : Recreating project files RECREATING LOST OR DELETED PROJECT FILES ---------------------------------------- This information is provided for Borland customers using the Integrated Development Environment(IDE) project files feature that will create, add and delete items from a project. Should a project file need to be recreated because it was lost or deleted, there is a way to recreate them faster than adding each item one at a time by hand from within the IDE. To view the document pertaining to the reasons why project files may need to be deleted see TI731, titled "Project Files Corruption", which can be found on the Borland BBS, on CompuServe, Bix, or Genie, and through the fax service, TechFax. THE HISTORY OF PROJECT FILES ---------------------------- When Turbo C++ 3.0 was released there was a need for many people to be able to convert their project files from ealier versions of our C products, such as Turbo C 1.0 or 2.0, to Turbo C++ 3.0 project files. The utility project convert (prjcnvt.exe) was provided for this task. Earlier project files were ASCII files with a listing of the files that were in the project. They looked something like this: mymain.c myfuncs.c library.lib objects.obj USING PROJECT CONVERT --------------------- The syntax of project convert is as follows: PRJCNVT infile[.prj] [outfile[.prj]] or PRJCNVT infile[.tc] [outfile[.prj]] If no extension is provided .TC is assumed. If a .TC file is not PRODUCT : Borland C++ NUMBER : 1562 VERSION : All OS : DOS/WIN DATE : October 25, 1993 PAGE : 2/4 TITLE : Recreating project files found a .PRJ file will be looked for. The default name of the output file is the base name of the input file with the extension .PRJ (i.e. FOO.TC will become FOO.PRJ). If the input and the output name are the same, the the old file will be renamed to a .BAK file. RECREATING PROJECT FILES - THE PROCESS ---------------------------------------- A sample of the entire process is as follows: 1) Redirect the output from a DOS dir/B command to a file. This will list all the files in the current directory in a single column. *c:\work> dir/B > output.prj Here is an example of what you might get: SUBDIR1 SUBDIR2 mymain.cpp myfuncs.cpp library.lib objects.obj header.h myother.cpp other.txt 2) Edit the file to delete any unnecessary file names and subdirectories. *c:\work> edit output.prj If we were working with the above file, it should now look like this: mymain.cpp myfuncs.cpp library.lib objects.obj myother.cpp PRODUCT : Borland C++ NUMBER : 1562 VERSION : All OS : DOS/WIN DATE : October 25, 1993 PAGE : 3/4 TITLE : Recreating project files 3) Use the prjcnvt command to create the new project file. *c:\work> prjcnvt output.prj myprog.prj 4) Start the IDE. 5) ASCII text files do not contain any sort of compiling options, so memory models and paths must be set again by hand from within the IDE. 6) After resetting any options, the configuration must be saved IMMEDIATELY in order to ensure that the information is not lost. This can be done via Options | Environment | Save, making sure Project is marked with an [X] and selecting OK. TIPS AND HINTS -------------- It might be wise to do two things before continuing: Turn off the autosave feature when compiling and debugging within the IDE. Problems in code being debugged can corrupt project files, resulting in confusing and eroneous errors. By turning off the Autosave feature for projects and desktops, we significantly reduce the chances of saving a corrupted project or desktop file. To turn off autosave: Select Options | Environment | Preferences and in the dialog box shown, turn off the [X] next to the project line in the Auto Save box. Select Options | Save and turn ON the [X] for Environment and Project. (This is the way to save all options changes by hand as well) Make a copy of all project files. Put them in a separate directory. Thus if corruption or loss should occur again, there is an available copy that can be used easily. PRODUCT : Borland C++ NUMBER : 1562 VERSION : All OS : DOS/WIN DATE : October 25, 1993 PAGE : 4/4 TITLE : Recreating project files DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.