|I have a .bat file that needs to write one variable to a .txt file if the file doesn't exist or read from it if it does. I also need it to save the .txt file in the same location as the .bat file. And if it reads the variable location and it doesn't exist, I need it to delete the .txt file and ask for input again.|
set /p var= Where is your world folder?
set /p var2= What kind of map would you like to use?
set /p var3= Where would you like to save it?
AlphaVespucci -p %var% %var2% -outputDir %var3%
From what I have gathered, you can write to a file by typing ">>C:\ echo %var%"
I'm not 100% on that part yet, but it's my guess from what I found.
After that I just need it to be able to check in the same folder as the .bat for the .txt. If it doesn't exist, take %var% and create it. It also needs to delete the .txt if it can't find %var%.
Thanks for any help.