Search found 211 matches

by thefeduke
25 Nov 2017 01:06
Forum: DOS Batch Forum
Topic: Working with the limitations of CmdFont
Replies: 9
Views: 9870

Re: Working with the limitations of CmdFont

Actually i'm testing how to get a full list of the console fonts Thank you for your insightful explanation. Steffen, your temporary fix suits my needs just fine. By adding this with the new module: For /F "usebackq tokens=1-3* delims=:" %%A in (`cmdfont`) do ( If /I "%%~D" EQU "Current" Set "Font=%...
by thefeduke
24 Nov 2017 00:45
Forum: DOS Batch Forum
Topic: Working with the limitations of CmdFont
Replies: 9
Views: 9870

Working with the limitations of CmdFont

The most recent incarnation of this utility was Rem Start http://www.dostips.com/forum/viewtopic.php?p=53820#p53820 Rem Posted: Wed Sep 06, 2017 11:50 am by aGerman Rem Post subject: Automated setup of DOS command window on behalf of penpen. I am OK with the set function only supporting Raster fonts...
by thefeduke
23 Nov 2017 19:46
Forum: DOS Batch Forum
Topic: split string into substrings based on delimiter
Replies: 44
Views: 88211

Re: split string into substrings based on delimiter

Aacini wrote:If you eliminate x3 variable the resulting expression will be shorter, so a larger string could be processed.
Done. Thank you for noticing.

John A.
by thefeduke
23 Nov 2017 01:09
Forum: DOS Batch Forum
Topic: split string into substrings based on delimiter
Replies: 44
Views: 88211

Re: split string into substrings based on delimiter

... This is much more useful :!: I altered the output slightly: . . . I am posting the script with those changes in its entirety, with just a little more added function. I added an x3 variable to the magic incantation to save the last position found and used that to set the return code (with a valu...
by thefeduke
02 Nov 2017 00:28
Forum: DOS Batch Forum
Topic: split string into substrings based on delimiter
Replies: 44
Views: 88211

Re: split string into substrings based on delimiter

You may get the same result in a simpler way: . . . The only drawback with this method is to choose an unused character/string as replacement of the exclamation mark. In this code I chose the open exclamation mark "¡" used in Spanish. Thank you, Antonio! Not only simpler, but more fitting in the us...
by thefeduke
26 Oct 2017 20:57
Forum: DOS Batch Forum
Topic: split string into substrings based on delimiter
Replies: 44
Views: 88211

Re: split string into substrings based on delimiter

"Get all positions where a substring appear in a larger string (NOT case sensitive)" . . . set "w=%x:er=" & call :strLen w j & set /A i+=j+k & set "x2=!x2!,!i!" & set "w=%" . . . set "w=%x:here=" & call :strLen w j & set /A i...
by thefeduke
16 Sep 2017 00:22
Forum: DOS Batch Forum
Topic: Tales of DOS Window sizes and position - Know what is yours to control
Replies: 1
Views: 2892

Re: Tales of DOS Window sizes and position - Know what is yours to control

The following code was added to the original post: :: display some font info for all Console Windows For /F "usebackq tokens=1-3 delims=," %%B IN ( `findstr /i "facename fontsize" "%Temp%\~Docs~\HKCU\Console_stats.csv"` ) Do ( If /I "%%~B" NEQ "!PrevLine!...
by thefeduke
15 Sep 2017 17:29
Forum: DOS Batch Forum
Topic: Tales of DOS Window sizes and position - Know what is yours to control
Replies: 1
Views: 2892

Tales of DOS Window sizes and position - Know what is yours to control

There have been several topics about adjusting sizes, positions and fonts. This is to make it easier to see what you actually have to work with. Here is what you can take away from this topic: ⋅ a subroutine to textify some registry DWORD values ⋅ a batch script to display select...
by thefeduke
12 Sep 2017 15:08
Forum: DOS Batch Forum
Topic: How to sort numeric variables ascending in DOS Batch?
Replies: 2
Views: 4331

Re: How to sort numeric variables ascending in DOS Batch?

This solves your example in terms of input and desired output: @echo off &setlocal EnableDelayedExpansion set number1=4 set number2=1 set number3=5 set number4=2 set number5=3 >%Temp%\%~n0.txt Echo. For /L %%N in (1,1,5) Do >>%Temp%\%~n0.txt Echo.!number%%~N! Sort %Temp%\%~n0.txt /o %Temp%\%~n0....
by thefeduke
05 Sep 2017 22:47
Forum: DOS Batch Forum
Topic: Automated setup of DOS command window
Replies: 39
Views: 34422

Re: Automated setup of DOS command window

1) If the default fonts haven't changed (by win version/edition/system ...; i am using win xp home 32 bit), then you may choose them with CmdFont.exe. You may compile it (.NET is needed to be installed) by executing this "CmdFont.cs.bat" (use this name to avoid errors): A few places point...
by thefeduke
02 Sep 2017 13:57
Forum: DOS Batch Forum
Topic: Exclude current directory from PATH search
Replies: 7
Views: 5833

Re: Exclude current directory from PATH search

A couple of years ago I was experimenting with poorly chosen names in the CD interfering with the system search.

This would open up the possibility of adding the CD behind the path and disabling searching the CD first.

John A.
by thefeduke
01 Sep 2017 23:04
Forum: DOS Batch Forum
Topic: Is the "Select all" link failing?
Replies: 26
Views: 20800

Re: Is the "Select all" link failing?

Even if the region is the same, there might be differences (although there shouldn't be any in theory). Thank you for the reply. I think that I have stumbled upon a simpler answer for this particular situation. The following two examples appear the same, but use the "code" tags differentl...
by thefeduke
01 Sep 2017 16:02
Forum: DOS Batch Forum
Topic: Is the "Select all" link failing?
Replies: 26
Views: 20800

Re: Is the "Select all" link failing?

Thanks Antonio! Either Peter fixed it and didn't tell us or Google updated the Chrome browser which I didn't realize Steffen Now that "Select all" seems to work, I have a related question. Before there was a "select all", I used to drag the mouse from beyond the end of the last ...
by thefeduke
25 Aug 2017 23:55
Forum: DOS Batch Forum
Topic: The use of blank at the beginning, extension for set / p (without LineFeed)
Replies: 2
Views: 4392

Re: The use of blank at the beginning, extension for set / p (without LineFeed)

A recent neighboring subject: "Colorful animation using VT100 - Pure batch WIN 10 only" shows a short method that handles leading and trailing spaces: @echo off & setlocal enableDelayedExpansion for /F %%a in ('echo prompt $E^| cmd') do set "ESC=%%a" <nul set /p "=%ESC%[...
by thefeduke
20 Aug 2017 15:16
Forum: DOS Batch Forum
Topic: THE ANONYMOUS MESENGER
Replies: 2
Views: 3181

Re: THE ANONYMOUS MESENGER

If you are interested in ths kind of thing, here is some good reading:http://www.dostips.com/forum/viewtopic.php?f=3&t=7078 Post subject: Send commands to a cmd window through a .bat file - Rejected StackOverflow question.