Microsoft
Software
Hardware
Network
Question : Batch File: Skip number 5
Hi there,
In the following script, I need to skip number 5.
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
for /L %%A in (1,1,10) do (
IF %%A == 5 GOTO :EOF
echo %%A
)
ECHO.
echo DONE
ECHO.
pause
EXPECTED OUTPUT:
--------------------------
-----
1
2
3
4
6
7
8
9
10
DONE
Thanks for your help,
Rene
Answer : Batch File: Skip number 5
So then, wouldn't that just be this?
@echo off
for /l %%A in (1,1,10) DO (
If %%A NEQ 5 (
echo %%A
REM rest of logic here...
)
)
~bp
Random Solutions
Hyperlink issues
ActiveSync http error 500/400--All mobile devices--
Microsoft VBScript runtime error '800a0009', Subscript out of range: '42'
Password Protect Back End of an Access Database
Expanding virtual disk Raid 5 on Dell Server PowerEdge 2950
Script to enable folder auditing
IIS7 - Server.CreateObject Failed
Exchange ISNTEG Utility Test Results
HTML table
Sysprepping Windows 7 Ultimate