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
Urgent - Please Please Help - How can i check if someone has logged in to my account in Facebook and read my emails??
Firefox css border on inside of div when embedding Flash with SWFObject, why?
Routing Problem WatchGuard x750e Firewall
MsexchangeOma event id 1801
Relative Size Pivot Table Macro
Deploying local user policies, non-domain
Microsoft PKI Design
Updating a Data Set that has been returned from a Function or DLL
HP-UNIX - compressing/zipping files that are 31GB
SSIS Package Hangs in SQL Job