Search found 166 matches
- 17 May 2024 11:46
- Forum: DOS Batch Forum
- Topic: dir ????????.txt does not show only files with length of 8 characters
- Replies: 7
- Views: 278
Re: dir ????????.txt does not show only files with length of 8 characters
Apologies for the oversight. @echo off & setlocal enableDelayedExpansion for /f "delims=" %%i in ('dir /b "*.txt"') do ( set "str=A%%~ni" set "len=0" for /L %%A in (12,-1,0) do ( set /a "len|=1<<%%A" for %%B in (!len!) do if "!str:~%%B,1!"=="" set /a "len&=~1<<%%A" ) if !len! equ 8 ( echo %%~i ) ) p...
- 17 May 2024 07:19
- Forum: DOS Batch Forum
- Topic: dir ????????.txt does not show only files with length of 8 characters
- Replies: 7
- Views: 278
Re: dir ????????.txt does not show only files with length of 8 characters
I'd just check the name length directly.
Code: Select all
for /f "delims=" %%i in ('dir /b "*.txt"') do (
set "current=%%i"
if /i "!current:~9!" neq "" (
echo %%~i
)
)
- 07 May 2024 07:46
- Forum: DOS Batch Forum
- Topic: Dinosaur Game from Chrome in Batch - Remake
- Replies: 4
- Views: 367
Dinosaur Game from Chrome in Batch - Remake
Hello!
This game is made 100% pure batch, utilizing Vt100 and multi-threading for the desired effects.
enjoy
Code:
https://github.com/IcarusLivesHF/Batch- ... meGame.bat
This game is made 100% pure batch, utilizing Vt100 and multi-threading for the desired effects.
enjoy
Code:
https://github.com/IcarusLivesHF/Batch- ... meGame.bat
Code: Select all
Controls:
W: Jump
TAB: QUIT
- 03 May 2024 08:27
- Forum: DOS Batch Forum
- Topic: Mask password with Asterisk
- Replies: 16
- Views: 23325
Re: Mask password with Asterisk
This is probably what you're looking for. I cannot recall where I found this code. Sorry about that. @echo off call :getPassword password echo Password:%password% pause exit /b rem Subroutine to get the password :getPassword returnVar set "_password=" for /f %%a in ('"prompt;$H&for %%b in (0) do rem...
- 26 Apr 2024 21:52
- Forum: DOS Batch Forum
- Topic: Dos Batch Math Library
- Replies: 69
- Views: 102476
Re: Dos Batch Math Library
I would like to contribute Cohen Kappa @echo off set "kappa=(((1000*(a+d)/(a+b+c+d)) - ((((10000*(a+c)/(a+b+c+d))*(10000*(a+b)/(a+b+c+d))) + ((10000*(b+d)/(a+b+c+d))*(10000*(c+d)/(a+b+c+d))))/100000)) * 1000 / (1000 - ((((10000*(a+c)/(a+b+c+d))*(10000*(a+b)/(a+b+c+d))) + ((10000*(b+d)/(a+b+c+d))*(10...
- 22 Jan 2024 06:26
- Forum: DOS Batch Forum
- Topic: 3D Cube Orthographic Projection
- Replies: 3
- Views: 4640
Re: 3D Cube Orthographic Projection
Thank you for the suggestions! I will make an update accordingly, and republish soon. Thank you for your time and appreciation!
OP EDITED: Thanks for suggestions
OP EDITED: Thanks for suggestions
- 21 Jan 2024 15:26
- Forum: DOS Batch Forum
- Topic: 3D Cube Orthographic Projection
- Replies: 3
- Views: 4640
3D Cube Orthographic Projection
Hello everyone, I'm more than certain you guys at dostips could find ways to improve this, but I'm still happy to share :mrgreen: References: https://en.wikipedia.org/wiki/Orthographic_projection https://en.wikipedia.org/wiki/Rotation_matrix Update: Allows use of TAB key to quit, uses %esc% captured...
- 18 Dec 2023 06:31
- Forum: DOS Batch Forum
- Topic: How can a batch lower the priority ONLY of the cmd that runs it?
- Replies: 1
- Views: 4073
Re: How can a batch lower the priority ONLY of the cmd that runs it?
You need to either use %~f0 or define scriptName
- 16 Dec 2023 05:22
- Forum: DOS Batch Forum
- Topic: How to make an underscore variable "-----" with the length of the argument variable?
- Replies: 5
- Views: 8399
Re: How to make an underscore variable "-----" with the length of the argument variable?
Here is the second concept that Squashman recommended where you take a long buffer of "----" and substring to the correct length, saving you time on doing a for loop each time. @echo off SETLOCAL ENABLEDELAYEDEXPANSION set "hiddenChars=----------------------------------------------------------------...
- 22 Nov 2023 07:08
- Forum: DOS Batch Forum
- Topic: Problem passing parameters by ref in for /R
- Replies: 3
- Views: 16732
Re: Problem passing parameters by ref in for /R
The only way I could solve it was like this :create_folders1 set "param=!%~1!" for /R "%param%" %%D in (*.*) do echo working... echo "!%~1!" goto :eof I'm not 100%, but I think it's because of the order of which things are happening, and I think the step which variable expansion happens, happens too...
- 03 Nov 2023 06:13
- Forum: DOS Batch Forum
- Topic: Foxidrive has left us
- Replies: 42
- Views: 184028
Re: Foxidrive has left us
In the code of life, Foxidrive left behind an indelible legacy, and in our hearts, they remain a brilliant friend whose memory continues to light our path.
- 25 Oct 2023 06:28
- Forum: DOS Batch Forum
- Topic: Another amazing porting...
- Replies: 14
- Views: 91317
Re: Another amazing porting...
Hello einstein!
I hope you're doing well. Amazing work as always. Seems to perform really well on my low grade acer laptop.
Thanks for sharing!
P.s I haven't forgotten the 3D rose you wanted to do. Though I still have no idea how to do it, I still think it would be very fun. Cheers!
I hope you're doing well. Amazing work as always. Seems to perform really well on my low grade acer laptop.
Thanks for sharing!
P.s I haven't forgotten the 3D rose you wanted to do. Though I still have no idea how to do it, I still think it would be very fun. Cheers!
- 02 Oct 2023 05:21
- Forum: DOS Batch Forum
- Topic: Batch native: a collection of dll's for cmd
- Replies: 2
- Views: 13113
Re: Batch native: a collection of dll's for cmd
Personally, I'd like to see a more standardized output from the xbox controllers. Would be really fun to use otherwise.
- 14 Jun 2023 08:37
- Forum: DOS Batch Forum
- Topic: How to convert argument list to skip first argument?
- Replies: 5
- Views: 2443
Re: How to convert argument list to skip first argument?
You could do it this way @echo off & setlocal enableDelayedExpansion call :function "one" "two" "three" "four" "five" pause & exit :function set /a "SKIP=1", "args=0" set /a "start=1 + skip" for %%i in (%*) do ( set /a "args+=1" set "func[!args!]=%%~i" ) for /l %%i in (%start%,1,%args%) do ( echo !f...
- 01 Jun 2023 04:15
- Forum: DOS Batch Forum
- Topic: Dos Batch Math Library
- Replies: 69
- Views: 102476
Re: Dos Batch Math Library
Hey thanks, Aacini! The formula written this way makes much more sense!