刪除文字檔案
以下示例說明如何在批處理程式中使用
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