Page 1 of 1

.bat

Posted: Mon Feb 17, 2025 1:35 pm
by Piero
Do you Windows ppl remember the batch files?
They still work, even with drag&drop…

Ooh… the good old times when the quick brown fox jumped over the lazy dog… (this is a Mac thing)

Can you share some Magic you did with them?

Re: .bat

Posted: Mon Feb 17, 2025 2:09 pm
by Quin
Put these 5 characters in a batch script and run it. Be ready to kill it or reboot though, this is a fork bomb and will waste your RAM.

Code: Select all

%0|%0
;)

Re: .bat

Posted: Mon Feb 17, 2025 2:16 pm
by Piero
Quin wrote: Mon Feb 17, 2025 2:09 pm;)
Bad Boy!
I wondered if you can realize you got a blue screen (instead of a "rogue" program you need to kill)

Re: .bat

Posted: Tue Feb 18, 2025 12:31 am
by BarryG
Piero wrote: Mon Feb 17, 2025 1:35 pmDo you Windows ppl remember the batch files?
What do you mean "remember"? They're still in common use today. That's like asking if we remember text files.

Re: .bat

Posted: Tue Feb 18, 2025 5:42 am
by BarryG
Quin wrote: Mon Feb 17, 2025 2:09 pm Put these 5 characters in a batch script and run it. Be ready to kill it or reboot though, this is a fork bomb and will waste your RAM.

Code: Select all

%0|%0
;)
Just tried it in the Windows Sandbox and I see what you mean! :shock: You'd think Windows would prevent a batch file recursively calling itself.

Re: .bat

Posted: Tue Feb 18, 2025 1:09 pm
by NicTheQuick
Forkbombs also exist in other programming languages. In Bash (one of the equivalents of Batch for Linux) it looks like this:

Code: Select all

:(){ :|:& };:
On the German Wikipedia article there are also a few others: https://de.wikipedia.org/wiki/Forkbomb

Re: .bat

Posted: Mon Mar 24, 2025 4:07 am
by Olli
On batch, not only the RAM : the file system can be exploded also. I won t present anything here...

Code: Select all

@echo off
cls
pause
myPurebasicProgram.exe
if %errorlevel% neq 0 goto qqch
goto fin
:qqch
echo End anything detected !
:fin

Re: .bat

Posted: Tue Mar 25, 2025 5:48 pm
by Piero
Before Fred banning us all, please let's revert to celebrating .bat files' support for drag&drop!!!
Last time I used them was with DOS…
I mean, before a recent, disappointing "ffmpeg piping batch processing test" (but I must say the output file renaming was piece of cake…)

"Shell":

Code: Select all

ffile=pippo.pip
noext=${ffile%.*}
ext=${ffile##*.}
echo "${noext}_LM.${ext}"

Re: .bat

Posted: Sun Mar 30, 2025 2:47 pm
by tj1010
You can't extract/store regex match substring only the whole carriage-return string that contains a match, which extremely limits everything you can do with batch single-handedly.. Then there are a lot of ACL based bugs around SMB, FTP, and LDAP stuff you can do from CMD which makes it useless in enterprise without a lot of icacls stuff you can't automate because the substring problem..

I don't understand why if you can copy-paste a better windows 11, Linux, cure for cancer, or MacOS from any AI prompt why they can't just fix this stuff? :lol: