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
Exchange 2003 to Exchange 2010 Migration
Student Profiles
to check if a download will be spyware free
How to connect Hyper-V Server 2008 R2 to Cluster Shared Volumes
Apache2 name-based virtual host & SSL
Security error accessing url-Destination: DefaultHTTP-Channel.Securi
ty.Error
Configuration for QNAP TS-410U after reset
how to indent a block of text
Small Business Server Crital alerts
"svc: short len 19, dropping request"