Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Working With and Understanding Variables  (Read 2057 times)

0 Members and 1 Guest are viewing this topic.

Dartag

  • Guest
Working With and Understanding Variables
« on: May 16, 2006, 11:13:26 AM »
What is the best place to go to find how to effectively understand how to use variables in DOS batch files?  Other than the basic %1, %2, etc. examples, it's difficult to find much good information.

Specifically, I'm a bit confused on the multiple % signs used with variables.  Sometimes you just see one, and other times you'll see %%<variable> or %<variable>%.  I get the system variable thing, but it's still confusing with all of the variations and specifics for those variations.  It would be nice to learn about the more complicated aspects, such as when to use what variables with which special coding needed for each and where to use them.

If possible, I prefer getting the information on where to find the answer, rather than just be given the answer...I find I remember things much easier if I have to do a little research myself.  It also helps in becoming a resource for others...if I truly understand the answer, rather than just repeat what I've been told, I can help others much better than I could if I were just tossed a quick bit of code.  Does anyone have a reference that might be a good starting point to learning these intricacies (online is much better than book learning, as cost is an issue)?
« Last Edit: May 16, 2006, 11:15:20 AM by Dartag »

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: Working With and Understanding Variables
« Reply #1 on: May 16, 2006, 03:52:51 PM »
Online, I have found Allenware to be one of the best. You'll need some serious time to finish the entire course.

If you have access to a library, Microsoft used to publish DOS manuals for each version of DOS.

You can also type Help at a command prompt to get a list of batch and DOS commands valid on your machine. By typing command-name /? you will get information specific to each command.

Also try the Help and Support feature of most Window machines.

There is a wealth of information on the web; you should have no trouble finding information.

Good luck.  8-)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein