BatchHacker

Simple Batch - Use a file to save variable

Jul 20th, 2013
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. :cls
  3. cls
  4. if exist text.sav goto loadandshow
  5. title Enter your text to save it!
  6. echo.
  7. echo Enter your text to save it!
  8. echo.
  9. set /p text=Text:
  10. if "%text%"=="" goto cls
  11. echo set text=%text%>text.sav
  12. cls
  13. :loadandshow
  14. ren text.sav text.bat
  15. call text.bat
  16. ren text.bat text.sav
  17. echo Your save: %text%
  18. echo.
  19. pause>>nul
  20. exit
Advertisement
Add Comment
Please, Sign In to add comment