China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-22 20:18
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » How to create a batch file? Clear the temporary file TEMP every time it starts? View 1,800 Replies 3
Original Poster Posted 2003-04-09 00:00 ·  中国 河南 漯河 中移铁通
初级用户
Credits 116
Posts 3
Joined 2003-04-09 00:00
23-year member
UID 1457
Gender Male
Status Offline
How to create a batch file? To clear the temporary file TEMP every time it starts? It would be great if the temporary files under the system could be deleted every time it starts!
Floor 2 Posted 2003-04-09 00:00 ·  中国 广东 佛山 禅城区 电信
元老会员
★★★★
Credits 5,170
Posts 1,637
Joined 2002-10-16 00:00
23-year member
UID 8
Gender Male
From 广东佛山
Status Offline
Open attachment

Easy, take XDEL above as an example
Write autoexec.bat like this
@echo off
smartdrv 8192
xdel /n /s c:\*.tmp
xdel /n /s c:\~*.*

Loading SMARTDRV makes it faster, /N parameter is no need to answer, /S is to handle files in subdirectories together.
我的网志
http://hzmys.blog.163.com/
我的网盘
firststep.qjwm.com
fsmys.ys168.com
ssmys.ys168.com
www.brsbox.com/fsmys
www.brsbox.com/ssmys
www.brsbox.com/ccdos
Floor 3 Posted 2003-04-09 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
You can use PC - CACHE to make it automatically exit the disk buffer after deletion, for example:

PC - CACHE /SIZEXT:8192 /MINI
...
PC - CACHE /U
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 4 Posted 2003-04-12 00:00 ·  中国 湖北 十堰 移动
初级用户
Credits 109
Posts 3
Joined 2003-04-12 00:00
23-year member
UID 1489
Gender Male
Status Offline
I added in autoexec.bat under win98:
@echo off
deltree /y c:\windows\temp\*.* >nul
deltree /y c:\windows\recent\*.* >nul
In this way, it automatically deletes useless temporary files and shortcuts in the temp directory and recent (shortcuts in Documents in the Start menu) every time you start up, including temporary subdirectories in the temp directory, (so del cannot be used). I have been using it for ~3-4 years, and the effect is very good. It should be noted that the /y parameter after deltree must not be forgotten, otherwise when 98 starts up to the black screen, you will only see the cursor flashing and it will not continue (because it is waiting for you to confirm Y or N). But I wonder if there is such a simple method under me, 2k or xp?
Forum Jump: