Search found 4309 matches

by Squashman
30 Jan 2022 11:42
Forum: DOS Batch Forum
Topic: Find text string in TXT hosted on Server.
Replies: 11
Views: 9141

Re: Find text string in TXT hosted on Server.

So if you have files on another computer on your network how do you get to them?

(Teaching you to fish)
by Squashman
30 Jan 2022 10:22
Forum: DOS Batch Forum
Topic: Find text string in TXT hosted on Server.
Replies: 11
Views: 9141

Re: Find text string in TXT hosted on Server.

So you know the name of the server. You know the severs ip address. You know the name of the file you need to search. You know what the search string is. What is your problem?
by Squashman
30 Jan 2022 10:18
Forum: DOS Batch Forum
Topic: Insert Text in Second Last Line of .xml
Replies: 6
Views: 4195

Re: Insert Text in Second Last Line of .xml

To me it does not seem to be escaping the / in </menu>, therefore its excluding any line with menu in it? What made you think you needed to escape anything in the search string using the find command? The help syntax does not reference it at all. If you read the help for the findstr command then in...
by Squashman
29 Jan 2022 14:06
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 13158

Re: search for previous item

New code. @echo off &setlocal set "file=filearchive2.txt" set "search=doc190049.pdf" for /f "usebackq tokens=1,2,* delims= " %%G in (`findstr /IC:"#" /IC:"%search%" "%file%"`) do ( if /I "%%G"=="#" ( set "archive=%%I" ) ELSE ( FOR /F "tokens=1,2,* delims= " %%J in ("%%I") DO ( IF /I "%%L"=="%search%...
by Squashman
29 Jan 2022 13:30
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 13158

Re: search for previous item

this is exactly real word 2015-01-03 22:31 4490416 4490416 d:\zipfile1.7z # Archivio d:\zipfile1.7z 2015-01-01 22:51 56091 56369 file1.pdf 2015-01-01 22:51 14975 14479 file2.pdf # Fine dell'archivio 2015-01-03 22:31 4490416 4490416 d:\zipfile2.7z # Archivio d:\zipfile2.7z 2015-01-02 23:21 14576321 ...
by Squashman
29 Jan 2022 13:09
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 13158

Re: search for previous item

this is exactly real word 2015-01-03 22:31 4490416 4490416 d:\zipfile1.7z # Archivio d:\zipfile1.7z 2015-01-01 22:51 56091 56369 file1.pdf 2015-01-01 22:51 14975 14479 file2.pdf # Fine dell'archivio 2015-01-03 22:31 4490416 4490416 d:\zipfile2.7z # Archivio d:\zipfile2.7z 2015-01-02 23:21 14576321 ...
by Squashman
29 Jan 2022 12:05
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 13158

Re: search for previous item

darioit wrote:
29 Jan 2022 11:59
@Squashman slowly but can't find a zip match, sorry
I will disagree. It finds the matches based on your provided data. If it did not find a match then your provided data is not what you gave as an example.
by Squashman
29 Jan 2022 11:47
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 13158

Re: search for previous item

Another option. Probably not as fast as aGerman's solution. Don't have a big file to test with us. echo off &setlocal set "file=filearchive.txt" set "search=doc3.pdf" for /f "usebackq tokens=1,* delims= " %%G in ("%file%") do ( if /I "%%G"=="#Archivio" ( set "archive=%%H" ) ELSE ( FOR /F "tokens=1,2...
by Squashman
27 Jan 2022 12:00
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 1924519

Re: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets

Hello. i am stuck on trying to search&replace chars .\ with null. i want to eliminate all occurences of ".\" in every line of a test file. here below the Windows script (called by call :jreplcall). No error is shown and no replacement is done. I am sure the chars are the problem but i dont see how ...
by Squashman
26 Jan 2022 16:34
Forum: DOS Batch Forum
Topic: The fastest way to detect internal IP address
Replies: 8
Views: 7007

Re: The fastest way to detect internal IP address

I use the following command to detect internal IP address (the 4th field): netstat -rn | findstr "\<0.0.0.0\>" In my opinion it's too slow. I think it's because of netstat as the slowest command itself. Slow computer then. On my 8th Gen I7 I blinked and this was done. TimeThis : Command Line : nets...
by Squashman
26 Jan 2022 08:25
Forum: DOS Batch Forum
Topic: Insert Text in Second Last Line of .xml
Replies: 6
Views: 4195

Re: Insert Text in Second Last Line of .xml

If </menu> is the last line of the xml file it should be pretty straight forward. You have to make a new file so just redirect all the lines currently in the file to a new file except for </menu> with the find or findstr commands. Or when you are reading the file with the FOR /F command, check to se...
by Squashman
26 Jan 2022 08:19
Forum: DOS Batch Forum
Topic: type file dont change??
Replies: 5
Views: 3592

Re: type file dont change??

Were you doing this from the command line or a batch file?
by Squashman
19 Jan 2022 12:19
Forum: DOS Batch Forum
Topic: VFile creator
Replies: 15
Views: 13317

Re: VFile creator

I don't see any SUB (hex 1A) or Carriage Returns (hex 0D) in your file.
by Squashman
18 Jan 2022 17:40
Forum: DOS Batch Forum
Topic: VFile creator
Replies: 15
Views: 13317

Re: VFile creator

Could you zip up the text file and upload it here. Or run this code so we can see the hex of those two lines. This does a binary compare of the input file with a dummy file. Input file should be named test.txt @echo off for /f %%a in ('"prompt $H&for %%b in (1) do rem"') do set /p "BS=%%a"<nul >dumm...
by Squashman
18 Jan 2022 08:13
Forum: DOS Batch Forum
Topic: The fastest way to detect internal IP address
Replies: 8
Views: 7007

Re: The fastest way to detect internal IP address

siberia-man wrote:
17 Jan 2022 12:04
My question

Is it 100% reliable way for detecting internal IP address?
If your end goal is to find all devices on your network the answer is no.