Search found 35 matches

by vin97
14 Jun 2022 18:55
Forum: DOS Batch Forum
Topic: How to clear global variables when launching cmd from within a batch?
Replies: 6
Views: 4292

Re: How to clear global variables when launching cmd from within a batch?

Is there no way to spawn a completely fresh cmd instance?
I wouldn't have a problem utilizing temp files to pass on the few select variables that have to be kept.
by vin97
14 Jun 2022 17:42
Forum: DOS Batch Forum
Topic: How to clear global variables when launching cmd from within a batch?
Replies: 6
Views: 4292

How to clear global variables when launching cmd from within a batch?

What is the syntax for the start command to launch cmd.exe in a way where only specific variables are retained? Example: set "VariableThatsSupposedToBePassedOn=X" set "VariableThatsNotSupposedToBePassedOn=Y" start "" cmd.exe "set "var=%VariableThatsSupposedToBePassedon%" & echo "%var%" & echo "%Vari...
by vin97
14 Jun 2022 09:32
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2008110

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

Never mind, the solution was on the first page. I just put timeout /t 1 in my cmd.exe spawnloop.
by vin97
14 Jun 2022 06:22
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2008110

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

By the following link you can find the long discussion how we tried to fix it. https://www.dostips.com/forum/viewtopic.php?f=3&t=6133&hilit=cmdpid Before I dive in, did you find a solution or not? In my case, the total number of maximum parallel JREPL calls is fixed, so in theory I could give each ...
by vin97
13 Jun 2022 18:35
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2008110

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

I ran across a strange problem when running multiple looped batch files in parallel that all execute (individual copies of) JREPL. C:\Users\Vini\AppData\Local\Temp\jrepl.bat.14.06.2022_ 2.21.56,50_27286.temp"\\"!")" kann syntaktisch an dieser Stelle nicht verarbeitet werden. This is a nonsense error...
by vin97
13 Jun 2022 09:19
Forum: DOS Batch Forum
Topic: Splitting large text file at specific line without for loop
Replies: 3
Views: 3151

Re: Splitting large text file at specific line without for loop

Hmm, ok. I thought there maybe is a native way in batch because findstr can process the whole file way way faster than a for /f readloop.
by vin97
13 Jun 2022 07:12
Forum: DOS Batch Forum
Topic: Splitting large text file at specific line without for loop
Replies: 3
Views: 3151

Splitting large text file at specific line without for loop

I have a very large text file that I need to split at a certain line number.
Can this be done without having to for-loop through all the lines?
I'm open to external utilities.


Unrelated question: Does using unnecessary delayed variables (! instead of %) significantly reduce speed?
by vin97
29 Sep 2020 04:12
Forum: DOS Batch Forum
Topic: Memory leak when reading large text files
Replies: 19
Views: 14481

Re: Memory leak when reading large text files

I was busy with other stuff but I will probably not bother finding the exact cause since I was planning on reinstalling my OS anyhow. Also, I am pretty certain that with the tipps provided here and some other simple optimizations to the code, it will be possible to avoid these memory-hungry loops/co...
by vin97
03 Aug 2020 09:35
Forum: DOS Batch Forum
Topic: Memory leak when reading large text files
Replies: 19
Views: 14481

Re: Memory leak when reading large text files

Ok, going to start rewriting my program then.
Learning a lot here, thanks again!
by vin97
02 Aug 2020 07:22
Forum: DOS Batch Forum
Topic: Memory leak when reading large text files
Replies: 19
Views: 14481

Re: Memory leak when reading large text files

Ok, I will test that. How does CMD work out piping internally or more specifically, what counts as a "critical pipe" capable of causing memory issues? Is it just piping into a command (with "|") or does it apply to "redirecting" in general? For example, could I avoid the problems by writing to tempo...
by vin97
01 Aug 2020 13:21
Forum: DOS Batch Forum
Topic: Memory leak when reading large text files
Replies: 19
Views: 14481

Re: Memory leak when reading large text files

Just Windows defender.
by vin97
01 Aug 2020 11:58
Forum: DOS Batch Forum
Topic: Memory leak when reading large text files
Replies: 19
Views: 14481

Re: Memory leak when reading large text files

Ok.

Is it only the nonpaged pool that can cause a system crash or does this also happen when memory is low in general? In other words, is it enough to only monitor the nonpaged pool in the batch file?

What kind of memory % do you suggest for stopping the program?
by vin97
01 Aug 2020 06:06
Forum: DOS Batch Forum
Topic: JREPL: Cutting of a string after the n-th occurrence of specific character?
Replies: 17
Views: 11465

Re: JREPL: Cutting of a string after the n-th occurrence of specific character?

Yes, that's the one I am using.
More specifically: dir /s /a /n /tw /o-d /4 /-c
by vin97
01 Aug 2020 06:04
Forum: DOS Batch Forum
Topic: Memory leak when reading large text files
Replies: 19
Views: 14481

Re: Memory leak when reading large text files

Thanks for the tips!

I think the leak is coming from some driver. Deactivating the antivirus gives the same result.
So there is really no way to clear the nonpaged pool manually?