需列印資料夾內所有檔案名稱清單?Win7 可透過自建批次檔並加入「傳送到」選單,右鍵資料夾 → 「傳送到」 → 「列印目錄清單」即可一鍵完成,無需第三方軟體。
Printdir.txt。@echo off dir %1 /-p /o:gn > "%temp%\Listing.txt" start /w notepad /p "%temp%\Listing.txt" del "%temp%\Listing.txt" exit
Printdir.bat,**儲存至 C:\Windows** (需管理員權限,確保系統路徑可直接呼叫)。shell:sendto 開啟「傳送到」資料夾 (%AppData%\Microsoft\Windows\SendTo)。%windir%\Printdir.bat → 下一步。

dir 參數調整輸出格式:/b 僅檔名、/s 遞迴子目錄、/o:d 依日期排序、/o:s 依大小排序。start /w notepad /p 改為 copy "%temp%\Listing.txt" "%~dp1\FileList_%date:~-4,4%%date:~-7,2%%date:~-10,2%.txt" 自動存入資料夾內。