批次擋的變數累加 - Windows
By Yuri
at 2011-07-29T17:22
at 2011-07-29T17:22
Table of Contents
大家好
我已經爬過文了,
先前那篇累加的文章跟我的狀況不太一樣
我的code如下:
set c=0
For /F %%i in (new.txt) do (
set /a c+=1
set count!c!=%%i
)
PAUSE
其中new.txt裡面檔名:1.txt 2.txt
我預期指令變成count1=1.txt
count2-2.txt
但是那個累加的c卻都還是c,不是數字1 2
是code哪邊有錯嗎@@
拜託大家~~
--
我已經爬過文了,
先前那篇累加的文章跟我的狀況不太一樣
我的code如下:
set c=0
For /F %%i in (new.txt) do (
set /a c+=1
set count!c!=%%i
)
PAUSE
其中new.txt裡面檔名:1.txt 2.txt
我預期指令變成count1=1.txt
count2-2.txt
但是那個累加的c卻都還是c,不是數字1 2
是code哪邊有錯嗎@@
拜託大家~~
--
Tags:
Windows
All Comments
Related Posts
WINDOWS8
By Elma
at 2011-07-29T14:12
at 2011-07-29T14:12
請問如何在win7上裝wmp 10?
By Barb Cronin
at 2011-07-29T01:03
at 2011-07-29T01:03
kmplayer的關聯檔不能設定
By Sarah
at 2011-07-28T23:35
at 2011-07-28T23:35
win32k.sys和ntoskrnl.exe 檔造成藍屏問題
By Freda
at 2011-07-28T22:56
at 2011-07-28T22:56
筆電要灌雙系統前出現藍白畫面
By Rebecca
at 2011-07-28T22:43
at 2011-07-28T22:43