Search found 503 matches
- 04 Dec 2012 09:28
- Forum: DOS Batch Forum
- Topic: Improved :Format, new :FormatVar and :FormatColor functions
- Replies: 8
- Views: 7872
Re: Improved :Format, new :FormatVar and :FormatColor functi
The best benchmark is not changes the scenario. Please testing you original code, and the same but with my suggested modification (for avoid confussions I put it in the download link) (You can compare with WinMerge). I do the test using timethis.exe and always my suggestion writing in code consume l...
- 03 Dec 2012 18:28
- Forum: DOS Batch Forum
- Topic: Improved :Format, new :FormatVar and :FormatColor functions
- Replies: 8
- Views: 7872
Re: Improved :Format, new :FormatVar and :FormatColor functi
Maybe I not explained good. I explain that you run the disable of delayed expansion before the main FOR not inside it. This is the tested fixed code that reflect my comment: @echo off setlocal enableDelayedExpansion echo My way with IF echo %time% for /l %%N in (1 1 10000) do ( if "!"==&qu...
- 03 Dec 2012 17:20
- Forum: DOS Batch Forum
- Topic: Improved :Format, new :FormatVar and :FormatColor functions
- Replies: 8
- Views: 7872
Re: Improved :Format, new :FormatVar and :FormatColor functi
Dave in the colorPrintVar I found that this line: if "!" equ "" setlocal disableDelayedExpansion is very unnecessary because it will be executed for every special character. This mean that you run this routine: Active DelayedExpansion Split the line line in LF Reading every slice...
- 03 Dec 2012 16:49
- Forum: DOS Batch Forum
- Topic: Color function v19
- Replies: 26
- Views: 35574
Re: Color function v17
Dave, thanks for insert the idea of split the special characters in LF. It was very useful for increase the speed of the code. I take that and develop the version 15. But, accidentally I insert a compatibility problem using some atributes to a file. Anyways, I refined the code many times and now I u...
- 28 Nov 2012 00:18
- Forum: DOS Batch Forum
- Topic: Undocumented FINDSTR features and limitations
- Replies: 29
- Views: 44722
Re: Undocumented FINDSTR features and limitations
Thanks for the info. When I specify /L or /R using the /C option, I get a message that says that the /C option was omitted. C:\Users\Carlos>echo.#|findstr /c /l "#" FINDSTR: se ha omitido /c # C:\Users\Carlos>echo.#|findstr /c /r "#" FINDSTR: se ha omitido /c # Also, I have a dud...
- 27 Nov 2012 22:08
- Forum: DOS Batch Forum
- Topic: Color function v19
- Replies: 26
- Views: 35574
Re: Color function v14.1
Thanks abc0502 for the support.
I posted the version 14.1 with fixes. I change the way of usage of the function, now is necessary pass a name of variable with the text.
I posted the version 14.1 with fixes. I change the way of usage of the function, now is necessary pass a name of variable with the text.
- 27 Nov 2012 22:02
- Forum: DOS Batch Forum
- Topic: Undocumented FINDSTR features and limitations
- Replies: 29
- Views: 44722
Re: Undocumented FINDSTR features and limitations
Thanks.
I remember that the default is /R not /L.
Example:
print #
but
don't print anything. The default is /R not /L
I remember that the default is /R not /L.
Example:
Code: Select all
echo.#|Findstr "."
print #
but
Code: Select all
echo.#|Findstr /L "."
don't print anything. The default is /R not /L
- 27 Nov 2012 19:35
- Forum: DOS Batch Forum
- Topic: Color function v19
- Replies: 26
- Views: 35574
Re: Color function v13
abc0502 thanks for inform the error. Was because the code mount a volume that is not alphabetic and in windows xp Pushd and Cd /d not support it, unlike windows 7. I posted the version 13 with the error fixed. This version is more long in code because it support characters like: /\!" and works ...
- 27 Nov 2012 17:17
- Forum: DOS Batch Forum
- Topic: Color function v19
- Replies: 26
- Views: 35574
Re: Color function v12
Thanks foxidrive for the comment and for the test.
I updated the code for last. Now, in version 12 if you put only the code under the label :Color in a batch file, you can run it even with extensions disabled.
I updated the code for last. Now, in version 12 if you put only the code under the label :Color in a batch file, you can run it even with extensions disabled.
- 27 Nov 2012 15:13
- Forum: DOS Batch Forum
- Topic: Color function v19
- Replies: 26
- Views: 35574
Color function v19
This is a function for print text in color using native findstr.exe. Handle fine all characters, and works in Windows XP, 7 y 8.
Note: new version 20 here viewtopic.php?f=3&t=4453
Note: new version 20 here viewtopic.php?f=3&t=4453
- 25 Nov 2012 23:14
- Forum: DOS Batch Forum
- Topic: Another take on safe string replace
- Replies: 19
- Views: 14532
Re: Another take on safe string replace
Hello. Finally I undestand the method and the code. Is very nice. I do some edits to the first code, removing some unnecessary setlocal, a label, a call, redundant lines. Coming soon I will mix these edited code with the second code of Liviu. @echo off & setlocal disableDelayedExpansion call :re...
- 24 Nov 2012 21:06
- Forum: DOS Batch Forum
- Topic: [Undocumented] Expand.exe
- Replies: 4
- Views: 6194
[Undocumented] Expand.exe
Time ago I studied and use the Expand.exe utility. Now I explain what are the types of compressed files that it support (using Windows 7). The expand.exe decompress any CABINET file (it are files with the extension .cab or for example with a extension that end with underscore, example: .ex_). This f...
- 24 Nov 2012 19:31
- Forum: DOS Batch Forum
- Topic: [BatchGame] SokoBox
- Replies: 9
- Views: 11318
Re: [BatchGame] SokoBox
Thanks for all comments. But code is not godlike All levels are solvables. For me the most difficult levels were 108, 114, 125, 144, 149. Updated again: I edited the code for use the bg.exe v2.4. Also I added a little animation that is displayed when you complete all levels. @Aacini: I tried write s...
- 24 Nov 2012 11:04
- Forum: DOS Batch Forum
- Topic: Another take on safe string replace
- Replies: 19
- Views: 14532
Re: Another take on safe string replace
Ok. Thanks. This is a more shorter and faster codification: :strlen (SETLOCAL ENABLEDELAYEDEXPANSION &SET L=0 &SET "S=A!%~1!" &FOR %%A in ( 4096 2048 1024 512 256 128 64 32 16 8 4 2 1) DO (SET /A "L|=%%A" FOR %%B IN (!L!) DO IF "!S:~%%B,1!"=="" SET...
- 23 Nov 2012 22:45
- Forum: DOS Batch Forum
- Topic: Another take on safe string replace
- Replies: 19
- Views: 14532
Re: Another take on safe string replace
Liviu. I would like understand the method. Please you can explain me? Maybe It helpme for maybe improve the codification. I improve the codification of nice strlen function. Because it works with numeric constants, I remove the mathematic calculation of the constants. Also I add the return of the le...