Run text file as command (cmd)
Gotruc
Posted messages
17
Status
Membre
-
Gotruc Posted messages 17 Status Membre -
Gotruc Posted messages 17 Status Membre -
Hello,
I don't know if this question has already been asked, but since I couldn't find an answer, I'm asking my question here.
I would like to know how to execute the contents of a text file as a command.
I know that you can do this by entering the content of the file as a variable and then executing it afterwards:
But is there a simpler way?
I don't know if this question has already been asked, but since I couldn't find an answer, I'm asking my question here.
I would like to know how to execute the contents of a text file as a command.
I know that you can do this by entering the content of the file as a variable and then executing it afterwards:
set /p command= <"text file"
%command%
But is there a simpler way?
3 réponses
Change simply the extension of your .txt file to .bat, double click on it and it will run like a charm :)
.txt => .bat
.txt => .bat