| Purpose |
The Microsoft 'analyze' database repair tool writes an 'analyze.log' file in the backup directory.
This small utility enables you to automatically preserve 'analyze' logs.
It renames the 'analyze.log' to 'analyze_date.log'. You can specify the date format you want.
A useful place to use it is in the nightly batch file, immediately after the 'analyze' step.
|
| How it Works |
As rename except that you can specify a different destination path and file name.
The source and target files must be on the same drive.
It is much faster than copying since the file's data is not physically moved.
|
| SS |
Tested with SourceSafe V5.0 V6.0.
|
| OS |
Windows NT/2K/XP Command line utility.
|
| Usage |
rnanalog [drive:][path]filename1.ext [drive:][path]filename2_DATESTRING.ext
DATESTRING is composed of three date specifiers : dd, mm OR mmm, yy OR ccyy
The date specifiers may be arranged in any order as long as they are contiguous.
For example : ddmmyy OR mmddyy OR ccyymmdd OR yymmdd OR mmmddyy
Filename2 can be different from filename1 if you want.
Arguments containing spaces should be quoted.
You can be 'in' any directory on the disk (except the target) when you execute the command.
If only filename1 and filename2 are specified then the rename will occur in the current directory.
|
| Outputs |
#1 : Move 'analyze.log' from the h: drive ..\data\backup directory which is left empty.
As the target path is not specified, the current directory (j:\) is assumed.
The log now appears in the root of the J: drive as 'analyze_20041229.log.
J:\>"h:\program files\microsoft visual studio\common\vss\utilities\rnanalog"
"h:\program files\microsoft visual studio\common\vss\data\backup\analyze.log"
analyze_ccyymmdd.log
#2 : Rename 'analyze.log --> analyze_041229.log in place in the h: drive ..\data\backup directory.
"h:\program files\microsoft visual studio\common\vss\utilities\rnanalog"
"h:\program files\microsoft visual studio\common\vss\data\backup\analyze.log"
"h:\program files\microsoft visual studio\common\vss\data\backup\analyze_yymmdd.log"
#3 : Rename 'analyze.log --> analyze_041229.log in place in the h: drive ..\data\backup directory.
cd "h:\program files\microsoft visual studio\common\vss\data\backup"
"h:\program files\microsoft visual studio\common\vss\utilities\rnanalog"
"analyze.log" "analyze_ccyymmdd.log"
#4 : Move 'analyze.log' from the h: drive ..\data\backup directory which is left empty.
The log now appears in the the h:\archived directory as 'analyze_20041229.log.
h:
cd "h:\program files\microsoft visual studio\common\vss\data\backup"
"h:\program files\microsoft visual studio\common\vss\utilities\rnanalog"
"analyze.log" "h:\archive\analyze_ccyymmdd.log"
cd "h:\archive"
|
| Returns Errorlevel |
0 success
1 invalid parameters
2 rename failed : file not found, in the source, in the target, target directory exists.
3 invalid date specifier(s)
|
| Credits |
Thanks to Annick Collet of EUMETSAT for suggesting this utility. |
| Installation |
Copy the program into the directory where you want to run it.
It's stand-alone and requires no configuration or support.
|
| Download |
rnanalog 1.1 (23 KB)
|