我想在我的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