Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tech-notes:scripts:top-tips [2019/03/05 13:48] – created gerardorourketech-notes:scripts:top-tips [2019/03/05 14:12] (current) – [ENABLEDELAYEDEXPANSION] gerardorourke
Line 2: Line 2:
  
 ==== echo without a new line - e.g. use "." to show progress in a loop ==== ==== echo without a new line - e.g. use "." to show progress in a loop ====
-echo | set/p=.+<code cmd> 
 +echo | set /p=. 
 +</code>
  
 +==== 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
 +</code>
  • tech-notes/scripts/top-tips.1551793717.txt.gz
  • Last modified: 2019/03/05 13:48
  • by gerardorourke