China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-02 23:49
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Please help take a look, where is the mistake?!! View 842 Replies 2
Original Poster Posted 2007-01-02 01:54 ·  中国 广东 茂名 电信
新手上路
Credits 6
Posts 2
Joined 2006-11-21 14:46
19-year member
UID 71271
Gender Male
Status Offline
@echo off
cmd /v:no
for /l %%i in (1,1,120) do (
set aa=00
if %%i GTR 9 set aa=0
if %%i GEQ 100 echo IBVolumectl image f:\user\%%i.ibv 0 . f:\game.img>>ibv.bat
if %%i LEQ 99 echo IBVolumectl image f:\user\!aa!%%i.ibv 0 . f:\game.img>>ibv.bat


The problem is that after running it, the for loop statement doesn't execute...
Floor 2 Posted 2007-01-02 02:07 ·  中国 河北 廊坊 三河市 移动
金牌会员
★★★★
Credits 2,725
Posts 1,160
Joined 2006-09-23 12:00
19-year member
UID 63486
From 河北廊坊
Status Offline
cmd /v:no is suitable for use on the command line; in a batch file use setlocal enabledelayedexpansion
For details, see post #2 at the link below
http://www.cn-dos.net/forum/viewthread.php?tid=20733&fpage=1&highlight=%E5%8F%98%E9%87%8F%E5%BB%B6%E8%BF%9F
三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。
Floor 3 Posted 2007-01-02 02:34 ·  中国 广东 茂名 电信
新手上路
Credits 6
Posts 2
Joined 2006-11-21 14:46
19-year member
UID 71271
Gender Male
Status Offline
Many thanks! It's been solved.
Forum Jump: