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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -