|
| |
.TouchTempFile
Description
Touch the file specified in #TempFile to show that it is currently being used by a script. This command appends a line of text to the
temporary file in the form
yyyymmdd hhmnss Active {DOMAIN\USER from COMPUTERNAME}
|
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
- .TouchTempFile 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 your temporary 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 |
|