Search found 656 matches

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

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
by miskox
20 Jul 2024 07:08
Forum: DOS Batch Forum
Topic: How to detect CRLF at the end of file?
Replies: 4
Views: 55447

Re: How to detect CRLF at the end of file?

Thank you, SB! Workd great.

So I have (thanku you Aacini and SB):

Code: Select all

findStr /v $ file.txt >nul && echo/>> file.txt
Saso
by miskox
19 Jul 2024 13:43
Forum: DOS Batch Forum
Topic: How to detect CRLF at the end of file?
Replies: 4
Views: 55447

Re: How to detect CRLF at the end of file?

That's why I ask you guys! You are genius Antonio!

Thanks!

Saso
by miskox
19 Jul 2024 09:39
Forum: DOS Batch Forum
Topic: How to detect CRLF at the end of file?
Replies: 4
Views: 55447

How to detect CRLF at the end of file?

What would be the easiest way to check if a .txt file has a CRLF at the end? If it is not there CRLF should be added. For adding CRLF to the end of the file I use: @echo off ::Define LF variable containing a linefeed (0x0A) set LF=^ ::Above 2 blank lines are critical - do not remove ::Define CR vari...
by miskox
17 Jul 2024 11:53
Forum: DOS Batch Forum
Topic: Problems using parameters in a STARTed Batch file
Replies: 10
Views: 54442

Re: Problems using parameters in a STARTed Batch file

I completely agree with you Steffen that this is going the right direction. But to have a .bat written for Windows 11 and majority of the users of this .bat are still on Windows 10 delays upgrade.

Thank you.
Saso
by miskox
17 Jul 2024 04:50
Forum: DOS Batch Forum
Topic: Problems using parameters in a STARTed Batch file
Replies: 10
Views: 54442

Re: Problems using parameters in a STARTed Batch file

I am on Win10 too.

But I am not moving to Win 11 just to see this smile.

Saso
by miskox
16 Jul 2024 14:40
Forum: DOS Batch Forum
Topic: Problems using parameters in a STARTed Batch file
Replies: 10
Views: 54442

Re: Problems using parameters in a STARTed Batch file

Missed part of this thread... I don't see it either:

Code: Select all

@echo off
>nul chcp 65001
echo ┌──┬──┐
echo │  │  │
echo ├──┼──┤
echo │😉│  │
echo └──┴──┘
pause
Saso
by miskox
16 Jul 2024 04:56
Forum: DOS Batch Forum
Topic: Progress bar
Replies: 6
Views: 42325

Re: Progress bar

T3RRY wrote:
16 Jul 2024 03:25
ESC[nX
How I missed that? It has been quite a long time from the last time I used them (on DIGITAL's VT420 and VT520 video terminals on OpenVMS).

Thank you.
Saso
by miskox
16 Jul 2024 04:52
Forum: DOS Batch Forum
Topic: Strange thing
Replies: 2
Views: 20035

Re: Strange thing

Hi miskox, for /L %%f in (1,1,78) do call set filler=%%char219%%%%filler%% It's simply the "f" in "%%f ... iller%%" You used %%f as your FOR-metavariable, change that or use another variable name Thank you, Jeb. I noticed that. That's what I wrote at the end. Maybe somebody might have the same prob...
by miskox
16 Jul 2024 00:52
Forum: DOS Batch Forum
Topic: Progress bar
Replies: 6
Views: 42325

Re: Progress bar

Of course call to the :drawprogressbar should only be called 100 times and not each time a counter increases. @echo off cls echo P R O G R E S S B A R for /f %%a in ('echo prompt $E^| cmd') do set "ESC=%%a" echo. echo. echo. echo. echo. echo. REM hide cursor echo %esc%[?25l set spaces=&rem set fille...
by miskox
15 Jul 2024 23:40
Forum: DOS Batch Forum
Topic: Progress bar
Replies: 6
Views: 42325

Re: Progress bar

Update: 3rd version: instead of character 219 this version uses DEC character 'a' (▒). See https://vt100.net/docs/vt220-rm/chapter2.html#T2-4 @echo off cls echo P R O G R E S S B A R for /f %%a in ('echo prompt $E^| cmd') do set "ESC=%%a" echo. echo. echo. echo. echo. echo. REM hide cursor echo %esc...
by miskox
15 Jul 2024 12:50
Forum: DOS Batch Forum
Topic: Progress bar
Replies: 6
Views: 42325

Progress bar

This my very old post (https://www.dostips.com/forum/viewtopic.php?p=33575#p33575) should be updated with escape sequences. So here are two versions: First solution uses escape sequences just for cursor movement, other graphics is ASCII: @echo off cls echo P R O G R E S S B A R call :createbinvalue ...
by miskox
15 Jul 2024 12:22
Forum: DOS Batch Forum
Topic: Strange thing
Replies: 2
Views: 20035

Strange thing

See this: @echo off setlocal cls call :createbinvalue 219 DEL set filler=&rem set polnilo=&rem for /L %%f in (1,1,78) do call set filler=%%char219%%%%filler%% for /L %%f in (1,1,78) do call set polnilo=%%char219%%%%polnilo%% echo fill=%filler% echo poln=%polnilo% goto :EOF :createbinvalue REM par1=d...
by miskox
15 Jul 2024 11:52
Forum: DOS Batch Forum
Topic: Selfmodifying .bat
Replies: 0
Views: 24952

Selfmodifying .bat

I needed an information when .bat file was run - so I kept this information in a seperate file. But then I thought it would be better to have this information in the .bat file itself as the last line (because there are no other files I need). So this would not be too hard to implement. So here it is...
by miskox
26 Jun 2024 22:49
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)

2Aacini: here is version 1.3 if you want to added it to your first post. Changes: - added an easy way to translate three messages (everything else remains in English): 'Select the desired option', 'menu folder does not exist' and 'go back/exit' - added .cmd as supported file type - changed action fr...