Search found 9 matches

by Newbee
24 May 2021 22:15
Forum: DOS Batch Forum
Topic: Print an array elements based on an input param
Replies: 2
Views: 2357

Re: Print an array elements based on an input param

Thank you very much aGerman. It works like a charm!
Very nice trick, though. :D
by Newbee
23 May 2021 13:51
Forum: DOS Batch Forum
Topic: Print an array elements based on an input param
Replies: 2
Views: 2357

Print an array elements based on an input param

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...
by Newbee
21 Nov 2019 11:22
Forum: DOS Batch Forum
Topic: NEWBIE HERE :)
Replies: 3
Views: 4729

Re: NEWBIE HERE :)

I like your wonderful minimum animation, penpen :D
by Newbee
06 Jul 2018 18:26
Forum: DOS Batch Forum
Topic: FindRepl.bat:New regex utility to search and replace strings
Replies: 139
Views: 260502

Re: FindRepl.bat:New regex utility to search and replace strings

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...
by Newbee
06 Jul 2018 17:05
Forum: DOS Batch Forum
Topic: FindRepl.bat:New regex utility to search and replace strings
Replies: 139
Views: 260502

Re: FindRepl.bat:New regex utility to search and replace strings

I do this:

Code: Select all

FindRepl "D:\\1" /S:=D:\1;D:\2; >NUL
or this:

Code: Select all

FindRepl "D:\\1" /S:="D:\1;D:\2;" >NUL
The %errorlevel% are always 0, is it right?
by Newbee
06 Jul 2018 13:51
Forum: DOS Batch Forum
Topic: FindRepl.bat:New regex utility to search and replace strings
Replies: 139
Views: 260502

Re: FindRepl.bat:New regex utility to search and replace strings

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...
by Newbee
05 Jul 2018 23:51
Forum: DOS Batch Forum
Topic: FindRepl.bat:New regex utility to search and replace strings
Replies: 139
Views: 260502

Re: FindRepl.bat:New regex utility to search and replace strings

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.
by Newbee
05 Jul 2018 20:15
Forum: DOS Batch Forum
Topic: FindRepl.bat:New regex utility to search and replace strings
Replies: 139
Views: 260502

Re: FindRepl.bat:New regex utility to search and replace strings

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...
by Newbee
12 Jun 2018 14:13
Forum: DOS Batch Forum
Topic: Dateien verbinden und / Fehler bei Inhalte suchen
Replies: 2
Views: 2993

Re: Dateien verbinden und / Fehler bei Inhalte suchen

Es funktioniert gut auf meiner Maschine.