Thank you very much aGerman. It works like a charm!
Very nice trick, though.
Search found 9 matches
- 24 May 2021 22:15
- Forum: DOS Batch Forum
- Topic: Print an array elements based on an input param
- Replies: 2
- Views: 2919
- 23 May 2021 13:51
- Forum: DOS Batch Forum
- Topic: Print an array elements based on an input param
- Replies: 2
- Views: 2919
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...
- 21 Nov 2019 11:22
- Forum: DOS Batch Forum
- Topic: NEWBIE HERE :)
- Replies: 3
- Views: 5312
Re: NEWBIE HERE :)
I like your wonderful minimum animation, penpen
- 06 Jul 2018 18:26
- Forum: DOS Batch Forum
- Topic: FindRepl.bat:New regex utility to search and replace strings
- Replies: 139
- Views: 297869
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...
- 06 Jul 2018 17:05
- Forum: DOS Batch Forum
- Topic: FindRepl.bat:New regex utility to search and replace strings
- Replies: 139
- Views: 297869
Re: FindRepl.bat:New regex utility to search and replace strings
I do this:
or this:
The %errorlevel% are always 0, is it right?
Code: Select all
FindRepl "D:\\1" /S:=D:\1;D:\2; >NUL
Code: Select all
FindRepl "D:\\1" /S:="D:\1;D:\2;" >NUL
- 06 Jul 2018 13:51
- Forum: DOS Batch Forum
- Topic: FindRepl.bat:New regex utility to search and replace strings
- Replies: 139
- Views: 297869
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...
- 05 Jul 2018 23:51
- Forum: DOS Batch Forum
- Topic: FindRepl.bat:New regex utility to search and replace strings
- Replies: 139
- Views: 297869
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.
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.
- 05 Jul 2018 20:15
- Forum: DOS Batch Forum
- Topic: FindRepl.bat:New regex utility to search and replace strings
- Replies: 139
- Views: 297869
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...
- 12 Jun 2018 14:13
- Forum: DOS Batch Forum
- Topic: Dateien verbinden und / Fehler bei Inhalte suchen
- Replies: 2
- Views: 3377
Re: Dateien verbinden und / Fehler bei Inhalte suchen
Es funktioniert gut auf meiner Maschine.