0

Could you please explain what does it mean in bat file:

SET server=%~1
SimonD
  • 1,441
  • 2
  • 18
  • 30
  • check this out http://stackoverflow.com/a/112135/1056359 – thepoosh Apr 04 '13 at 09:36
  • [batch variables](http://stackoverflow.com/questions/15428777/whats-the-difference-between-a-and-variable-variables) – Endoro Apr 04 '13 at 09:50
  • possible duplicate of [What does %~d0 mean in a Windows batch file?](http://stackoverflow.com/questions/112055/what-does-d0-mean-in-a-windows-batch-file) – mmmmmm Apr 04 '13 at 11:09

1 Answers1

0

set the value of the environment variable server to the first command-line argument, with the " quotes removed.

Magoo
  • 77,302
  • 8
  • 62
  • 84
  • what does SET "$=%~1" means ? @Magoo – Subham Tripathi Feb 17 '15 at 05:15
  • 1
    @SubhamTripathi: Please don't use comments to ask questions - post your own question. "$" has no special significance in batch, unlike assembler. It's just another environment variable, so simply substitute `$` for `server` in the above. Personally, I use `$` (or sometimes `@ # _` as a prefix for flags or temporary variables where I have little control over what I'm attempting to flag - filenames or XML tags of significance to the procedure for instance. – Magoo Feb 17 '15 at 08:46