Advertisement
Stewie410

r/batch keatonfairey -- 2018-10-01

Oct 1st, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.58 KB | None | 0 0
  1. :: reddit.bat
  2. :: Author:      u/JustAnotherITUser
  3. :: Date:        2018-10-01
  4.  
  5. @echo off
  6. :: While the following isn't strictly necessary, I'd recommend enabling it
  7. :: manually when you're going to use set flags like "/p"
  8. setlocal enableextensions
  9.  
  10. :: Your issue is here.
  11. :: See the first double-quote here:
  12. ::          V
  13. ::set /p id="Enter the 5 digit store number: "
  14. ::
  15. ::
  16. :: with set /p, set /a, etc; you need to quote the entire expression:
  17. set /p "id=Enter the 5 digit store number: "
  18. echo.
  19. echo The Store Number entered was %id%
  20. set id=%id%
  21. echo.
  22.  
  23.  
  24. ping *%id%** @pause\
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement