skip to main | skip to sidebar

羅伯特的網誌

記錄生活上的心得分享經驗到Internet上

2010年5月6日 星期四

[windows batch] using variables in for loop

In a windows batch file (.bat or .cmd):

FOR /L %%i IN (1,1,5000) DO {
ECHO %%i
sleep -m 500
}

ref:
http://serverfault.com/questions/59014/for-loop-counting-from-1-to-n-in-a-windows-bat-script
http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/

張貼者: Robert 於 晚上11:53 沒有留言:
較新的文章 較舊的文章 首頁
訂閱: 文章 (Atom)

追蹤者

網誌存檔

  • ►  2011 (3)
    • ►  12月 (2)
    • ►  11月 (1)
  • ▼  2010 (7)
    • ►  10月 (1)
    • ►  7月 (1)
    • ▼  5月 (1)
      • [windows batch] using variables in for loop
    • ►  4月 (3)
    • ►  3月 (1)
  • ►  2009 (16)
    • ►  11月 (1)
    • ►  9月 (6)
    • ►  8月 (9)

關於我自己

Robert
檢視我的完整簡介