I know that I can start an exe by doing:
start "" /b filename.exe
But that requires me to know the name of filename.exe, how could I do that for any general file ending with .exe? I tried the obvious wildcard implementation:
start "" /b *.exe
Windows, however, gives me an error saying it cannot find "*.exe" file.
From cmd run this to the folder that has all the exe
you wish to run:
for %x in (*.exe) do ( start "" /b "%x" )
if you plan to run inside a batch file you can do in this way:
for %%i in (*.exe) do start "" /b "%%i"
if you want to skip a particular file to be executed:
for %%i in (*.exe) do if not "%%~nxi" == "blabla.exe" start "" /b "%%i"
if is necessary to check also the subfolders add the /r parameter:
for /r %%i in (*.exe) do start "" /b "%%i"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With