Exclamation marks (!) I n DOS batch files reference an intermediate value, useful if you are in a for loop. If you used% instead of (in a loop), it would return the same value over and over.
Lines 3 and 4 set "SOME_VARIABLE" to the intermediate value "SOME_ARGUMENTS: \ = \" and SOME_ARGUMENTS: "= \" respectively. Again, I assume these lines are taken from a loop.
Regarding variable assignments, Powershell variable assignments work as follows:
$myVariable = "my string"
~ dp0 (in the DOS batch) is converted to the path (with drive letter) of the current bat file. You can get this in Powershell by doing get-location.
Why someone had to set the variable for STAR (*) is outside of me, so I assume there is some encoding problem or for some other reason that they cannot just use an asterisk.
~ n0 I'm not sure; maybe someone else knows what it is.
Aaron source share