.bat

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
Piero
Addict
Addict
Posts: 923
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

.bat

Post 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?
Quin
Addict
Addict
Posts: 1133
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: .bat

Post 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
;)
User avatar
Piero
Addict
Addict
Posts: 923
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: .bat

Post 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)
BarryG
Addict
Addict
Posts: 4173
Joined: Thu Apr 18, 2019 8:17 am

Re: .bat

Post 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.
BarryG
Addict
Addict
Posts: 4173
Joined: Thu Apr 18, 2019 8:17 am

Re: .bat

Post 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.
User avatar
NicTheQuick
Addict
Addict
Posts: 1519
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: .bat

Post 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
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Olli
Addict
Addict
Posts: 1240
Joined: Wed May 27, 2020 12:26 pm

Re: .bat

Post 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
User avatar
Piero
Addict
Addict
Posts: 923
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: .bat

Post 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}"
tj1010
Enthusiast
Enthusiast
Posts: 716
Joined: Mon Feb 25, 2013 5:51 pm

Re: .bat

Post 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:
Post Reply