This is an old revision of the document!


Batch file Top tips

echo | set /p=.

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.1551794753.txt.gz
  • Last modified: 2019/03/05 14:05
  • by gerardorourke