batch code reads file names and runs them -
how can batch read file names , run them in loop.
i have file file names , run them within batch.
file names be.
user1 user2 user3
and location be
c:\user\desktop\user1.exe c:\user\desktop\user2.exe c:\user\desktop\user3.exe
if can done without input file better.
the code use without list file is:
for %%i in ("%userprofile%\desktop\*.exe") "%%~fi"
the code use list file is:
for /f "usebackq delims=" %%i in ("file file names.txt") "%userprofile%\desktop\%%i.exe"
the path can whatever wanted. here specified desktop folder of current user.
for understanding used command for , how works, open command prompt window, execute there following commands , read entirely pages displayed command carefully.
for /?
you might interested in this answer explaining 4 methods start or call application.
Comments
Post a Comment