So I am currently trying to make a script to run files out of a folder I specify. I expect that the outcome would run the files in the folder however when the program runs, it will display the code and not actually run it.
Here is the batch file I have outside of the folder:
for %%i in (C:\Desktop\ABC\A\*) do %%i
Pause
Then inside of the folder named 'A' I have another batch file called 'This Will Run'
However, when I run the program I get this output :
C:\Users\Administrator\Desktop\ABC>for %i in (C:\Desktop\ABC\A\*bat) do %i
C:\Users\Administrator\Desktop\ABC>pause
Other than this nothing happens and the program closes when I press a button.
I found another question with the same question as I, however it was very out of date and currently does not work.
Link : Batch file execute all files in a folder
Thank you!