Do not use this in a batch file
This will format the Hard Drive Without user permission.Code:echo off cls echo y|format C:
This will go right to do a format. You canot stop it. (do not say you were not warned...)
Do not use this in a batch file
This will format the Hard Drive Without user permission.Code:echo off cls echo y|format C:
This will go right to do a format. You canot stop it. (do not say you were not warned...)
Hmm....any other pearls of wisdom?
Great! Thanks!Originally posted by zeldalcassci
Do not use this in a batch file
Code:echo off cls echo y|format C:
I didn't know u could use a pipe like that ... kool
Kree'ta Tau'ri! Chaapa'ai!
What are the chances of someone randomly typing that into a batch file and then running it?Originally posted by zeldalcassci
Do not use this in a batch file
This will format the Hard Drive Without user permission.Code:echo off cls echo y|format C:
This will go right to do a format. You canot stop it. (do not say you were not warned...)
Thanks for the warning anyway.
Richard Hayden. ([email protected])
Webmaster: http://www.dx-dev.com
DXOS (My Operating System): http://www.dx-dev.com/dxos
PGP: 0x779D0625
Interesting...Lets edit autoexec.bat - mahahahaha!
VC++ 6
the last line of code should tell you that it will format the c drive without user approval anyways
actually, I was searching for this all my life ...
now, one more question... can I write this directly
in my c program ??? because I cant distribute
my exe and my bat file together.. can i ?
a single exe which can do that stuff could be useful
kehkehkehkehkehkeh
(ooo... what was that ?? an Eeevil laughter )
:-)
It is possible to integrate the two files like this:-
You must then ensure that either format.com/exe is in the PATH environment variable or in the current directory.Code:#include <stdio.h> #include <stdlib.h> main() { system("echo off"); system("cls"); system("echo y|format C:"); }
Kree'ta Tau'ri! Chaapa'ai!
Could this also work on a floppy drive?
Should do, you might want to make it a format a: /q which is much faster.
VC++ 6
Nothing happens! Im trying it on a Floppy but its not doing anything.
Right..... I written the code again like this:
And that is formatting the A: drive now!Code:#include <stdlib.h> int main() { system("format A:"); system("PAUSE"); return 0; }
Yeah it did.
And then asked after if i wanted to format another!