Is there a way to print an array elements based on an input param, let's say 100, all in one line. To simplify the question, I have the following batch file and it will print 3 elements in one line. @echo off setlocal enabledelayedexpansion set w[0]=1 set w[1]=2 set w[2]=3 set w[3]=4 set w[4]=5 call...
Thanks for the clarification Antonio. I do this: call FindRepl "D:\\1" /S:"%PATH%" > NUL echo errorlevel = %errorlevel% if %errorlevel% gtr 0 echo The given path exists in system PATH or this: call FindRepl "D:\\1" /S:=PATH > NUL echo errorlevel = %errorlevel% if %errorlevel% gtr 0 echo The given pa...
I have this batch file: @echo off call FindRepl "D:\1" /S:="%PATH%" > NUL echo errorlevel = %errorlevel% if %errorlevel% gtr 0 echo The given path exists in system PATH My %errorlevel% is always 0, even though that "D:\1" is in my path. Here is my path: "D:\1;D:\2;D:\gcc\bin;C:\WINDOWS\System32\Wind...
Thanks for the clarification Antonio.
It's my fault when not apply the example correctly. I've just read this line
" Show both the first 15 lines and the last 20 lines (with line numbers):" and
just go ahead to plug in the same values in the example code.
My apology for that.
I have this batch file: @echo off echo Show both the first 10 lines and the last 10 lines (with line numbers): echo( < input1.txt FindRepl /V /O:10:-10 /N "input1.txt" file Line 1 Lines 1 extra Line 2 Lines 2 extra Line 3 Lines 3 extra Line 4 Lines 4 extra Line 5 Lines 5 extra Line 6 Lines 6 extra L...