Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tech-notes:scripts:top-tips [2019/03/05 13:49] – [echo without a new line - e.g. use "." to show progress in a loop] gerardorourke | tech-notes:scripts:top-tips [2019/03/05 14:12] (current) – [ENABLEDELAYEDEXPANSION] gerardorourke | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ==== echo without a new line - e.g. use " | ==== echo without a new line - e.g. use " | ||
| <code cmd> | <code cmd> | ||
| - | echo | set/p=. | + | echo | set /p=. |
| </ | </ | ||
| + | ==== ENABLEDELAYEDEXPANSION ==== | ||
| + | Use in FOR loops to get variable as it is set there (rather than a parse time) - need to use !var! rather than %var% | ||
| + | Google it! | ||
| + | But any scripts with a ! get messed up! | ||
| + | |||
| + | <code cmd> | ||
| + | SETLOCAL ENABLEDELAYEDEXPANSION | ||
| + | SETLOCAL DisableDelayedExpansion | ||
| + | </ | ||