- Jun
- 223
- 0
How would I pass a variable to a command w/o adding it to the local environment?
E.g. so far:
set x=4 & command : command "consumes" %x
Problem: After "set x", %x is contained in the calling process's environment (unlik e.g. in Linux).
Note: This is going to be a one-liner used to call a PDIR function, not a batch file, so using SETLOCAL will not work...
E.g. so far:
set x=4 & command : command "consumes" %x
Problem: After "set x", %x is contained in the calling process's environment (unlik e.g. in Linux).
Note: This is going to be a one-liner used to call a PDIR function, not a batch file, so using SETLOCAL will not work...