删除文本文件
以下示例说明如何在批处理程序中使用
pushd
命令和popd
命令来更改当前目录,从而运行批处理程序,然后将其更改回来:@echo off rem This batch file deletes all .txt files in a specified directory pushd %1 del *.txt popd cls echo All text files deleted in the %1 directory
来自 https://technet.microsoft.com/en-us/library/cc771180%28v=ws.11%29.aspx