在批处理最后增加了启动Delphi的命令。将批处理和Delphi放在同一目录即可。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
@ECHO OFF
REM Enter temp directory.
%TEMP:~0,2%
CD %TEMP%
REM Try delete previously created
/renamed
files
which
was released after reboot.
DEL EditorLineEnds*.ttr
/Q
> nul
REM Try rename locked
file
.
REN EditorLineEnds.ttr
"EditorLineEnds_%date:~0,4%-%date:~5,2%-%date:~8,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%.ttr"
REM Display result.
DIR
/b
*.ttr
REM Back to batchfile path.
SET BatchPath=%~dp0
%BatchPath:~0,2%
CD %BatchPath%
REM Run Delphi.
START TDRun.exe
|