雖然圖形介面稱霸,但命令列仍是高效操作利器。Windows 預設要在資料夾開啟 CMD 需 Shift+右鍵,或修改註冊表移除 Shift 需求;更進階者可用 AutoHotkey 一鍵在總管當前路徑開啟 CMD。
regeditExtended 字串值:HKEY_CLASSES_ROOT\Directory\shell\cmdHKEY_CLASSES_ROOT\Drive\shell\cmdHKEY_CLASSES_ROOT\Directory\Background\shell\cmd#IfWinActive ahk_class ExploreWClass|CabinetWClass
#c::
OpenCmdInCurrent()
return
OpenCmdInCurrent() {
WinGetText, full_path, A
StringSplit, word_array, full_path, `n
current_dir := word_array1
Run, cmd /k cd /d "%current_dir%"
}
#IfWinActive
將腳本存為 .ahk 並執行,或編譯為 EXE 放入啟動資料夾。按 Win+C 即在當前總管視窗路徑開啟 CMD,輕鬆達到 Linux 終端機「右鍵開啟終端機」的體驗。
cmder、Windows Terminal 替代預設 CMD,體驗更佳。Run, wt -d "%current_dir%"(Windows Terminal)或 powershell -NoExit -Command "cd '%current_dir%'"。無論註冊表微調或熱鍵腳本,都能大幅縮短「導航到目錄」的時間,讓命令列操作更流暢。