我想在我的Downloads文件夾中打開每個以.jar結尾的文件。我的代碼不起作用。我做錯了什麼,如何實現我的最終目標?如何使用相同的擴展名打開多個文件
代碼:
del /s /q "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\session.*"
cls
:choice
cls
set /P c=Open the file? [Y/N]
if /I "%c%" EQU "Y" goto :start
if /I "%c%" EQU "N" goto :choice
goto :choice
:start
start "" "C:\Users\Home Computer\Downloads\????.jar"
del /s /q "C:\Windows\Prefetch\JAVA*.pf"
del /s /q "C:\Users\Home Computer\Recent\*.bat.lnk"
del /s /q "C:\Users\Home Computer\Recent\????.jar.*"
del /s /q "C:\Users\Home Computer\Recent\Downloads.lnk"
pause
編輯:我還要提到的是該.jar的名稱每次我重新下載時間而改變。我無法專門通過文件名來定位它。文件名總是四個字符。
看看這兩個截圖。 https://gyazo.com/579ebd940bcd74f3a3deeb05db7b337d
https://gyazo.com/ceaffd97bf1f1e81860036810b35fcd7
奇怪;這應該工作。它是否啓動了任何jar文件? – SomethingDark
不可以。看看這個:https://gyazo.com/579ebd940bcd74f3a3deeb05db7b337d – Quizzed
這些文件顯示在'dir「C:\ Users \ Home Computer \ Downloads」'的輸出中嗎?奇怪的是 – SomethingDark