Saved Bookmarks
| 1. |
Solve : Save? |
|
Answer» Hey echo file.txt>%0I think I see what you were trying to do, but you had your redirection the wrong way. > is to OUTPUT TO a file < is to read FROM a file Look up the syntax on the SET COMMAND. Specifically SET /P. There are even some examples on this forum on using SET /P in a batch file to set a variable from a file.ok well I tryed Code: [Select]@echo off set /a ex=0 set /a ex=%ex% + 1 echo %ex% pause>nul echo %ex%>file.txt set /p ex2=file.txt<%0 echo %ex2% pause>nul and it ended up with 1 [emailprotected] off I think this is because it's copying ECHO is off. into the file.txt im not sure about the [emailprotected] off thing |
|