|
| |
.MarkTempFile
Description
Mark the file specified in #TempFile to show that it is currently being used by a script. The mark is of the format
DashLine
Temporary file for script %~f0
DashLine
DO NOT DELETE THIS FILE UNLESS YOU KNOW THE SCRIPT IS FINISHED!
yyyymmdd hhmnss File in use {DOMAIN\USER from COMPUTERNAME}
DashLine
|
DashLine |
|
a line of 77
-'s {from .DashLine} |
| %~f0 |
|
fully qualified path name of the
currently running script |
|
yyyymmdd |
|
#LogDate {from .GetLogDate} |
|
hhmnss |
|
#LogTime {from .GetLogTime} |
|
DOMAIN |
|
%USERDOMAIN% {from local environment} |
| USER |
|
%USERNAME% {from local environment} |
|
COMPUTERNAME |
|
%COMPUTERNAME% {from local environment} |
This message can be viewed when performing disk housekeeping functions to keep an active temporary file from being accidentally deleted.
Syntax
Parameters and Switches
|
#TempFile |
|
the random name of a temporary
file |
Errorlevels and Output Variables
Examples, Notes and Instructions
- .MarkTempFile is best used when running a script that may take a long time.
First, use .GetTempFile and .MarkTempFile.
Then, before starting a section of code that may process for a long time, use .TouchTempFile to let any potential "disk housekeeper" know
to NOT DELETE the file!
- REMEMBER! When using ADS Buffers (see Buffer and .GetBuffers), the file specified in #TempFile
will "appear" to be empty even though it is actively being used by a script. That's why it is important to use .MarkTempFile and then,
at key points in a long script, .TouchTempFile, to indicate that the file is still in use.
Related .Mount/\Commands, #Constants,
$Functions, :Procedures
|
Resource |
|
Short Description |
|
.GetTempFile |
|
Retrieves a random temporary file name; saves the value in #TempFile |
|
K
E
Y |
Common Commands |
INTERNAL |
External |
/SWITCH |
Parameter |
Help text |
AddonTool |
|
Mounted Commands |
.Mount/\Command |
CmdShorthand |
#Constant |
$FUNCTION |
:Procedure |
!GuardNote |
|
Operating Systems |
NT/2K/XP/K3 |
NT Only |
NT/2K |
2K Only |
2K/XP |
XP Only |
XP/K3 |
K3 Only |
2K/XP/K3 |
|