Search found 656 matches

by miskox
30 Sep 2024 02:39
Forum: DOS Batch Forum
Topic: getting a filesize doesnt work without * in it, wish to know why
Replies: 3
Views: 30345

Re: getting a filesize doesnt work without * in it, wish to know why

SS64 has this (https://ss64.com/nt/for_r.html) Unlike some other variants of the FOR command, with FOR /R you must include a wildcard (either * or ?) in the 'set' to get consistent results returned. In many cases you can work around this by adding a single character wildcard e.g. if you are looping ...
by miskox
10 Sep 2024 00:19
Forum: DOS Batch Forum
Topic: scrolling region test
Replies: 8
Views: 59432

Re: scrolling region test

Antonio, I am very sorry. I really did not read that topic again - I just assumed that SS64's information is correct. Please accept my sincere apology. I didn't want to give credit to a wrong person. Then I guess Simon (SS64) should correct that info.

Saso
by miskox
05 Sep 2024 23:07
Forum: DOS Batch Forum
Topic: scrolling region test
Replies: 8
Views: 59432

Re: scrolling region test

Aacini wrote:
05 Sep 2024 21:49
PS - I wonder why you called the method to get the ESC character "Jeb's solution"...
Because: https://ss64.com/nt/syntax-ansi.html

where it says:
A batch file to save the ESC character in a variable %ESC% (via Jeb on the forum)
Did I miss something?

Saso
by miskox
03 Sep 2024 04:19
Forum: DOS Batch Forum
Topic: printf.exe: Arithmetic and Programming
Replies: 31
Views: 179476

Re: printf.exe: Arithmetic and Programming

Works for me, Saso. printf "%c#3Double Height (implies Double Width)\n%c#4Double Height (implies Double Width)\n" 27 27 Tested in the prompt of Windows Terminal. In a batch script you have to double the percent signs as always. And I think to make it also work in a console window, Antonio would hav...
by miskox
03 Sep 2024 04:16
Forum: DOS Batch Forum
Topic: scrolling region test
Replies: 8
Views: 59432

scrolling region test

Here is a scrolling region test. @echo off mode con cols=80 lines=24 cls REM Aacini's solution (see below for more info regarding this correction) for /f %%a in ('echo prompt $E^| cmd') do set "ESC=%%a" echo S C R O L L I N G T E S T echo %esc%[21;0H==================================================...
by miskox
02 Sep 2024 04:28
Forum: DOS Batch Forum
Topic: printf.exe: Arithmetic and Programming
Replies: 31
Views: 179476

Re: printf.exe: Arithmetic and Programming

Nice. I wanted to use escape sequence DECDHL—Double-Width, Double-Height Line but it is not supported in Windows.

This:

Code: Select all

ESC#3 Some text - displayed with double height and double width.
ESC#4 Some text - displayed with double height and double width.
Saso
by miskox
27 Aug 2024 04:45
Forum: DOS Batch Forum
Topic: Execute filename as a comand
Replies: 1
Views: 19962

Execute filename as a comand

I was bored.

set computername.cmd :

Code: Select all

@%~n0&pause&exit /b
Saso
by miskox
15 Aug 2024 05:48
Forum: DOS Batch Forum
Topic: Two Variable command ?
Replies: 5
Views: 108115

Re: Two Variable command ?

Why didn't you write *all* the information in the original post? See: https://www.dostips.com/forum/viewtopic.php?p=70082#p70082 Try this: @echo off set "dirH=c:\Dir1\HS" set "dirL=c:\Dir1\LS" set /a cnt=0 for /f "tokens=1 delims=" %%h in ('dir /b %dirH%\*.*') do ( for /f "tokens=1 delims=" %%l in (...
by miskox
14 Aug 2024 09:42
Forum: DOS Batch Forum
Topic: Two Variable command ?
Replies: 5
Views: 108115

Re: Two Variable command ?

Updated. Here is the code based on your original post: @echo off for /f "tokens=1 delims=" %%h in ('dir /b c:\Dir1\HS\*.*') do ( for /f "tokens=1 delims=" %%l in ('dir /b c:\Dir1\LS\*.*') do echo c:\Dir1\run\execute.exe -w:"c:\Dir1\HL\%%l" "c:\Dir1\HS\%%h" echo c:\Dir1\run\execute.exe -show c:\Dir1\...
by miskox
14 Aug 2024 04:15
Forum: DOS Batch Forum
Topic: Two Variable command ?
Replies: 5
Views: 108115

Re: Two Variable command ?

This maybe (make sure your files and folders have no spaces in the directory/filename): @echo off for /f "tokens=1 delims=" %%h in ('dir /b _h\*.*') do ( for /f "tokens=1 delims=" %%l in ('dir /b _L\*.*') do echo EXECUTE execute.exe -w:"%%l" "%%h" echo execute.exe -show %%h ^>%%h_result.txt echo/ ) ...
by miskox
14 Aug 2024 03:30
Forum: DOS Batch Forum
Topic: OT: WordStar for DOS 7 Archive
Replies: 1
Views: 22246

Re: OT: WordStar for DOS 7 Archive

Thank you. Checked the site. Very useful with lots of information. I guess I will not use (I write one or two documents a year).

Saso
by miskox
14 Aug 2024 03:28
Forum: DOS Batch Forum
Topic: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)
Replies: 21
Views: 80754

Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)

Version 1.4: To exit main menu key 0 was replaced by key (letter) X (could be changed to Q (for Quit) or whatever you want). If you have lots of submenus and keep pressing on key 0 to return to previous menu you could exit main menu even if you don't want to. Of course submenu should not have this l...
by miskox
07 Aug 2024 00:13
Forum: DOS Batch Forum
Topic: "TermStrWidth" utility – measure the number of cells a string occupies in the CLI.
Replies: 2
Views: 29047

Re: "TermStrWidth" utility – measure the number of cells a string occupies in the CLI.

Thank you Steffen. Very good read. It is time (long overdue?) for this change to happen.

Saso
by miskox
30 Jul 2024 21:57
Forum: DOS Batch Forum
Topic: Reduced-Flicker in dos batch. It's possible?
Replies: 40
Views: 167225

Re: Reduced-Flicker in dos batch. It's possible?

2icarius and 2einstein: I don't want to argue. I just thought that it was obvious to use ESC sequences for Win10+ without writting this (maybe somebody has Win10 only so this would look better). Or to have two different codes or one code with a check if OS WIN10+ or not.

Saso
by miskox
30 Jul 2024 11:40
Forum: DOS Batch Forum
Topic: Reduced-Flicker in dos batch. It's possible?
Replies: 40
Views: 167225

Re: Reduced-Flicker in dos batch. It's possible?

What happens if you remove CLS (only one CLS at the beginning) and move cursor with escape sequences? Saso It would probably help you if you read his code. It's not for windows 10. If I need glasses then you need them too: set "AF=1" %anti flikering. Keep redraw near timer coalescing for windows 7 ...