DISQUS

Tech-Recipes: Using variables in Windows batch files | Batch file programming | Tech-Recipes

  • Dylan · 1 year ago
    Nice easy tut for people not familiar with .bat variables. Leared a lot, before i got a bunch of stuff on 'ErrolLevel' stuff. Not what i was looking for.
  • Syed Mehroz Alam · 11 months ago
    Very nice. Helped a lot.
  • Vladimir Orlovsky · 10 months ago
    cmd command line
    set usb=h:

    Created system variable 'usb' with value 'h:'

    How to do the same from the batch file?
    Thanks, Vladimir Orlovsky 4vladimir@gmail.com 2009Feb04Wed14:05
  • Steve · 10 months ago
    Awesome instructions! Thanks a bunch
  • Eric · 7 months ago
    thanks alot I can set and echo variables now!

    @echo off
    color 80
    cls

    direct used busses to handlers



    -------------------------------------------
    /make all unused network busses travel here
    retrieve all available information for each
    ip address by storing them in a file called
    network_database

    set ip_address=ipaddress

    echo #%ip_address% > network_database
    network_database{
    #<ip address>
    retrevable information
    retrevable information}






    handlers for all network busses

    ::CALL network_handler
  • Glen Martin · 5 months ago
    Thanks, this helped me out! I am a software developer, but don't have much experience with batch files.
  • Mostafa KOTB · 4 months ago
    thanks alot. extremely useful
  • pratikshrestha · 3 months ago
    Thank you very much