Search found 918 matches
- 31 Jan 2018 10:45
- Forum: DOS Batch Forum
- Topic: Discussion about jeb's batch parsing rules on StackOverflow
- Replies: 42
- Views: 11267
Re: Discussion about jeb's batch parsing rules on StackOverflow
Thanks penpen for the idea to test with the debug mode. I tested it with echo ###1 echo(###2 echo (###3 echo[###4 echo=###5 I only show the relevant parts Cmd: echo Type: 0 Args: ` ###1' Cmd: echo Type: 0 Args: `(###2' Cmd: echo Type: 0 Args: ` (###3' Cmd: echo[###4 Type: 0 Cmd: echo Type: 0 Args: `...
- 30 Jan 2018 09:37
- Forum: DOS Batch Forum
- Topic: ECHO. FAILS to give text or blank line - Instead use ECHO/
- Replies: 38
- Views: 87544
Re: ECHO. FAILS to give text or blank line - Instead use ECHO/
A safe character to follow ECHO should be any token delimiter that is not white space. That leads me to predict that all of the following should be good: Code: Select all echo( echo= echo, echo; But ( is only a command Quite a nice try :wink:, but not safe for content. echo(/? echo=/? echo,/? echo;...
- 30 Jan 2018 05:58
- Forum: DOS Batch Forum
- Topic: Discussion about jeb's batch parsing rules on StackOverflow
- Replies: 42
- Views: 11267
Re: Discussion about jeb's batch parsing rules on StackOverflow
One critical thing I have discovered about phase 2 - A left paren ( functions as a token delimiter when parsing the command token :!: Yes, I know and I suppose I wrote something about that fact, as I assume that "echo(" got his special abillities from exactly there. The next test works with "ECHO["...
- 30 Jan 2018 02:40
- Forum: DOS Batch Forum
- Topic: Discussion about jeb's batch parsing rules on StackOverflow
- Replies: 42
- Views: 11267
Re: Discussion about jeb's batch parsing rules on StackOverflow
dbenham wrote: ↑ Fri Jan 26, 2018 2:29 pm Did jeb get this wrong :?: Or does the behavior described by jeb only apply to Win XP :?: Or ... :?: :? I tested the above with (a virtual machine) WinXP, SP3, x86: There the behaviour is as jeb described. I get different results than penpen. I retested it ...
- 26 Jan 2018 01:27
- Forum: DOS Batch Forum
- Topic: Discussion about jeb's batch parsing rules on StackOverflow
- Replies: 42
- Views: 11267
Re: Discussion about jeb's batch parsing rules on StackOverflow
1) Should phases 3 and 4 be reversed? The echoing of parsed commands (phase 3) occurs at two points: after the initial round of phase 2 (main parser), and then again after each round of phase 4 (FOR variable expansion for each DO iteration). I think the logic would be much simpler to describe if th...
- 25 Jan 2018 07:56
- Forum: DOS Batch Forum
- Topic: Detect echo state without temporary file
- Replies: 7
- Views: 2149
Re: Detect echo state without temporary file
No need for that. Code: Select all for /f "tokens=1,2 delims=: " %%A in ('mode con ^| findstr "Lines Columns"') do set %%A=%%B Okay, that's really simple :o Does that need to be adjusted for language? Also, does the output of ECHO or VERIFY or KEYS change with language? For ECHO it's irrelevant, as...
- 25 Jan 2018 05:56
- Forum: DOS Batch Forum
- Topic: Rules for label names vs GOTO and CALL
- Replies: 53
- Views: 24687
Re: Rules for label names vs GOTO and CALL
Hi Dave, great work :!: But some annotations. When scanning the file for the label name, I see that there are 5 (maybe 6) stop characters for the label name instead of two: <+>, <:>, <space>, <tab>, <LF>, and possibly <CR>. The other token delimiters are not stop characters I retested and I came to ...
- 25 Jan 2018 02:57
- Forum: DOS Batch Forum
- Topic: Detect echo state without temporary file
- Replies: 7
- Views: 2149
Re: Detect echo state without temporary file
Very interesting and ingenious, but I think a temp file is both more practical and probably faster. Yes, currently it's only a proof of concept, perhaps it can be improved with other ideas. Your idea is also very good, how to test VERIFY and KEYS, and obviously :D it still can work. You only have t...
- 24 Jan 2018 09:55
- Forum: DOS Batch Forum
- Topic: Detect echo state without temporary file
- Replies: 7
- Views: 2149
Detect echo state without temporary file
Until now it wasn't possible to detect the echo state without a temporary file. The main problem is, that fetching the current state doesn't work neither with FOR nor with pipes as both invoke a new cmd.exe instance where the echo state is resetted. The current working solution is to redirect the ou...
- 18 Jan 2018 13:18
- Forum: DOS Batch Forum
- Topic: Rules for label names vs GOTO and CALL
- Replies: 53
- Views: 24687
Re: Rules for label names vs GOTO and CALL
I didn't think of testing it in the command line context. That was an interresting idea. But I get other results than you. Tested on the command line echo Original > out.txt > out.txt :label & dir out.txt I get Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsc...
- 12 Jan 2018 06:59
- Forum: DOS Batch Forum
- Topic: setlocal enabledelayedexpansion and its potential effect?
- Replies: 6
- Views: 2026
Re: setlocal enabledelayedexpansion and its potential effect?
Starting a batch from inside a batch file doesn't add a return conetxt onto the call stack. Therefore, when the second batch is exited, normally the batch processing ends. But in this case a command block of a FOR command is used and command blocks are cached in memory and these blocks are never rea...
- 12 Jan 2018 00:04
- Forum: DOS Batch Forum
- Topic: setlocal enabledelayedexpansion and its potential effect?
- Replies: 6
- Views: 2026
Re: setlocal enabledelayedexpansion and its potential effect?
You have to CALL your script.
Without CALL the batch context ends and the command line context is enabled.
Without CALL the batch context ends and the command line context is enabled.
Code: Select all
Call C:\auto_pkg_build\...
- 03 Jan 2018 06:20
- Forum: DOS Batch Forum
- Topic: ComSpec strange behaviour
- Replies: 12
- Views: 4220
Re: ComSpec strange behaviour
It's strange. The default values are only loaded, when the variable is undefined, not when it's only changed to another value. And the pipe loads also the default values for PATHEXT and PATH. For COMSPEC it fails, probably because COMSPEC is needed before the default load function is called. I teste...
- 24 Oct 2017 08:48
- Forum: DOS Batch Forum
- Topic: Closing parenthesis prevents escape of subsequent special character operator
- Replies: 33
- Views: 10682
Re: Closing parenthesis prevents escape of subsequent special character operator
wow This seems to be a new interesting effect of command blocks. Perhaps there are more effects of the following code. Does it affect only the directly following characters or also characters later in the line? (I would like to test it right now, but I'm sitting on a swimming pool the next two week...
- 13 Oct 2017 00:41
- Forum: DOS Batch Forum
- Topic: How to move cursor upwards without cls?
- Replies: 21
- Views: 5530
Re: How to move cursor upwards without cls?
Hi,
I tried Aacini's code and it works (Win7 x64), but only when the screen width is set to 80.
When you modify the last SET then it works independent of the screen width.
I tried Aacini's code and it works (Win7 x64), but only when the screen width is set to 80.
When you modify the last SET then it works independent of the screen width.
Code: Select all
set ... ^& set /P "=.%TAB%%BS%%BS%%%C"