Search found 653 matches
- 19 Jul 2024 09:39
- Forum: DOS Batch Forum
- Topic: How to detect CRLF at the end of file?
- Replies: 4
- Views: 55338
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...
- 17 Jul 2024 11:53
- Forum: DOS Batch Forum
- Topic: Problems using parameters in a STARTed Batch file
- Replies: 10
- Views: 53995
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
Thank you.
Saso
- 17 Jul 2024 04:50
- Forum: DOS Batch Forum
- Topic: Problems using parameters in a STARTed Batch file
- Replies: 10
- Views: 53995
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
But I am not moving to Win 11 just to see this smile.
Saso
- 16 Jul 2024 14:40
- Forum: DOS Batch Forum
- Topic: Problems using parameters in a STARTed Batch file
- Replies: 10
- Views: 53995
Re: Problems using parameters in a STARTed Batch file
Missed part of this thread... I don't see it either:
Saso
Code: Select all
@echo off
>nul chcp 65001
echo ┌──┬──┐
echo │ │ │
echo ├──┼──┤
echo │😉│ │
echo └──┴──┘
pause
- 16 Jul 2024 04:56
- Forum: DOS Batch Forum
- Topic: Progress bar
- Replies: 6
- Views: 42052
- 16 Jul 2024 04:52
- Forum: DOS Batch Forum
- Topic: Strange thing
- Replies: 2
- Views: 19931
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...
- 16 Jul 2024 00:52
- Forum: DOS Batch Forum
- Topic: Progress bar
- Replies: 6
- Views: 42052
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...
- 15 Jul 2024 23:40
- Forum: DOS Batch Forum
- Topic: Progress bar
- Replies: 6
- Views: 42052
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...
- 15 Jul 2024 12:50
- Forum: DOS Batch Forum
- Topic: Progress bar
- Replies: 6
- Views: 42052
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 ...
- 15 Jul 2024 12:22
- Forum: DOS Batch Forum
- Topic: Strange thing
- Replies: 2
- Views: 19931
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...
- 15 Jul 2024 11:52
- Forum: DOS Batch Forum
- Topic: Selfmodifying .bat
- Replies: 0
- Views: 24802
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...
- 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: 79892
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...
- 24 Jun 2024 01:24
- Forum: DOS Batch Forum
- Topic: Weird behavior with CALL (function)
- Replies: 3
- Views: 20077
Re: Weird behavior with CALL (function)
I can confirm that jeb is right. If file is in Unix format it stops working.
Good catch Jeb!
Saso
Good catch Jeb!
Saso
- 19 Jun 2024 09:33
- Forum: DOS Batch Forum
- Topic: ENABLEDELAYEDEXPANSION in called bat files
- Replies: 2
- Views: 17841
Re: ENABLEDELAYEDEXPANSION in called bat files
I tried to add SETLOCAL DISABLEDELAYEDEXPANSION before this line !action[%descrip:~-4%]! "%choice%-%option%-%descrip%" followed by SETLOCAL ENABLEDELAYEDEXPANSION but I can't the line above to work. I tried many different options. No luck. If I add these two SETLOCAL commands in the called .bat (whi...
- 18 Jun 2024 23:33
- Forum: DOS Batch Forum
- Topic: ENABLEDELAYEDEXPANSION in called bat files
- Replies: 2
- Views: 17841
ENABLEDELAYEDEXPANSION in called bat files
Looks like I will be using Antonio's AutoMenu.bat (https://www.dostips.com/forum/viewtopic.php?f=3&t=10377#p66198). I noticed that ENABLEDELAYEDEXPANSION is set so my .bat files have delayed expansion enabled. This causes some problems with exclamation marks (!). What would be the best way to avoid ...