Search found 2253 matches

by dbenham
30 May 2019 05:41
Forum: DOS Batch Forum
Topic: why does this code output such result
Replies: 11
Views: 2421

Re: why does this code output such result

Yes - I thought that is what I effectively demonstrated in my explanation. But even if the 3rd ! was not escaped for round 5, it still would not expand to escapeOnly because you have !^^!, not !^!. If you want to get escapeOnly in round 5, then you need to remove the round 5 escape before the 3rd !,...
by dbenham
29 May 2019 08:42
Forum: DOS Batch Forum
Topic: why does this code output such result
Replies: 11
Views: 2421

Re: why does this code output such result

Your code is a goofy test of parsing - vary hard to follow. But it gives the expected result. I assume you are familiar with the various phases involved when parsing batch scripts , including a detailed description of the phase 1 and phase 5 rules for percent and delayed expansion . If not, then you...
by dbenham
25 May 2019 00:35
Forum: DOS Batch Forum
Topic: Safely parse nearly any CSV with parseCSV.bat v1.3
Replies: 10
Views: 11508

Re: Safely parse nearly any CSV with parseCSV.bat

OMG :shock: :oops:

I had a nasty bug in version 1.2 that prevented the /D option from working if /E was also used.

I updated the version to 1.3 in the first post of this thread.


Dave Benham
by dbenham
19 May 2019 20:21
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.4 - regex text processor with support for text highlighting and alternate character sets
Replies: 443
Views: 209339

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

Steffen (aGerman) discovered how to enable the ANSI escape sequences without resorting to modifying the registry. See series of posts starting at https://www.dostips.com/forum/viewtopic.php?f=3&t=9144&p=59700#p59691 This is useful for the new /H option. Here is version 8.1 JREPL8.1.zip Summary of Ch...
by dbenham
19 May 2019 19:33
Forum: DOS Batch Forum
Topic: Enable ANSI escape sequence within Windows 10 console
Replies: 7
Views: 1439

Re: Enable ANSI escape sequence within Windows 10 console

This is much faster :!: I can't really tell. The first time I launch PowerShell within a given cmd.exe process, it is always S... L... O.... W....... Thereafter it is relatively fast. Unfortunately it doesn't work using cmd.exe which would have been even faster. The cmd seems to reset VT processing...
by dbenham
16 May 2019 11:08
Forum: DOS Batch Forum
Topic: Enable ANSI escape sequence within Windows 10 console
Replies: 7
Views: 1439

Re: Enable ANSI escape sequence within Windows 10 console

Very cool 8) But yes, slow. Even so, I think it may be worth adding as an additional option. Maybe /VT to enable the escape sequences, for those that are desperate for the feature and willing to wait for the slow initialization. JREPL already has significant startup time, and as you have it, there i...
by dbenham
15 May 2019 12:22
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.4 - regex text processor with support for text highlighting and alternate character sets
Replies: 443
Views: 209339

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

Once I learned how to configure the Windows 10 console to support ANSI escape sequences , I created a new JREPL version that supports highlighting of matched or replaced text. Here is version 8.0 JREPL8.0.zip Summary of Changes C:\>jrepl /?history 2019-05-15 v8.0: Add /Hxxx options for highlighting ...
by dbenham
15 May 2019 10:57
Forum: DOS Batch Forum
Topic: Enable ANSI escape sequence within Windows 10 console
Replies: 7
Views: 1439

Enable ANSI escape sequence within Windows 10 console

Starting with Windows 10, the console supports ANSI escape sequences, but only if the console is configured to NOT "use legacy console", and the program writing to the console must configure its output to interpret the sequences. CMD.EXE was modified such that its internal commands do support the AN...
by dbenham
14 May 2019 10:43
Forum: DOS Batch Forum
Topic: Wait till close by title
Replies: 2
Views: 507

Re: Wait till close by title

Ooh - a bit of snark from aGerman... finally :!: :lol:
and well said.
by dbenham
07 May 2019 05:38
Forum: DOS Batch Forum
Topic: command prompt in windows 10
Replies: 31
Views: 11686

Re: command prompt in windows 10

Thanks npocmaka_ I did a Google search and discovered a new Microsoft GitHub Windows Terminal project that includes source code for both the old console as well as the new Windows terminal. Best of all, Windows is encouraging community participation in developing new features :!: Also within I found...
by dbenham
06 May 2019 12:22
Forum: DOS Batch Forum
Topic: Successfully escape a token delimiter in a fully qualified command path!
Replies: 7
Views: 1836

Re: Successfully escape a token delimiter in a fully qualified command path!

I tested the behaviour described by Dave. c:\temp\with^ space.bat - WORKS \temp\with^ space.bat - FAILS with^ space.bat - FAILS But only when you try it from the command line :!: Tested in a batch file the results are different c:\temp\with^ space.bat - WORKS \temp\with^ space.bat - WORKS with^ spa...
by dbenham
05 May 2019 06:32
Forum: DOS Batch Forum
Topic: Successfully escape a token delimiter in a fully qualified command path!
Replies: 7
Views: 1836

Re: Successfully escape a token delimiter in a fully qualified command path!

I had always understood that you cannot escape token delimiters - only quotes will work. I'm unsure if i misread something here... although i read the batch parsing rules multiple times, i never noticed that and i always thought the excact opposite. No, you did not misread anything. The phase rules...
by dbenham
05 May 2019 06:13
Forum: DOS Batch Forum
Topic: Successfully escape a token delimiter in a fully qualified command path!
Replies: 7
Views: 1836

Re: Successfully escape a token delimiter in a fully qualified command path!

Update - The path need not be fully qualified. As long as the volume is specified, you can escape the spaces in the command string - quotes are not needed. C:\test>c:abc^ xyz.bat OK I suppose I shouldn't be too shocked at the inconsistent behavior (quotes not needed with volume, needed without). The...
by dbenham
04 May 2019 22:37
Forum: DOS Batch Forum
Topic: Successfully escape a token delimiter in a fully qualified command path!
Replies: 7
Views: 1836

Successfully escape a token delimiter in a fully qualified command path!

I had always understood that you cannot escape token delimiters - only quotes will work. I suppose I knew that the token delimiter is initially escaped in phase 2 , but in a subsequent phase (execution phase 7, possibly others) the token delimiter cannot be escaped. So even if you escape a space in ...
by dbenham
02 May 2019 06:09
Forum: DOS Batch Forum
Topic: LERP() function
Replies: 4
Views: 645

Re: LERP() function

Actually, by escaping the closing parens in the LERP definition, you can gain that last bit of performance and preserve the formatting by combining the last three statements with line continuation. @echo off & setlocal enableDelayedExpansion & mode 100,100 ( for /f %%a in ('echo prompt $E^| cmd') do...