如何清除D盘新生成的文件

来源:百度知道 编辑:UC知道 时间:2024/05/08 03:25:36
我想电脑在每次开机会能自动清除掉D盘新成生的所有*.RAR\*.EXE文件,请问用什么方法可以做到?具体方法是怎样的?
批处理命令的内容怎么写?
请大家注意,不是清除垃圾文件,是清除新生成的EXE\RAR文件

弄个小的编程就好了
做个系统垃圾清除程序,很简单的
编程方法如下:

在记事本里输入

@echo off
echo 正在清除系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\COOKIES s\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
sfc /purgecache '清理系统盘无用文件
defrag %systemdrive% -b '优化预读信