Board logo

标题: 批处理删除文件后怎样输出文本? [打印本页]

作者: 5872169     时间: 2008-3-11 11:07    标题: 批处理删除文件后怎样输出文本?
我做了一个删除垃圾的批处理,有多条命令,我想运行完批处理后,输出文本,删除了哪些文件,请高手明示。最好一条命令能解决,不要在每条命令后加>。

作者: bat-zw     时间: 2008-3-11 12:23
不清楚你的具体用意,请给出环境。

作者: 5872169     时间: 2008-3-11 12:26
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\*.* 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\*.*" 导出文本,明确路径和删除了哪些文件,用一条命令完成不要在每条命令后加>