Author Options:

does "format C: \q" wipe the disk clean without asking you if you want it to, or is it "format C: /q" or something else? Answered

I'm not sure what command in batch will wipe the disk clean without asking you to confirm you want it to do so, I know "format C:" won't do it, but I heard "format C: /q" or "format C: \q" will mange. Please tell me what batch command will do it.


yes, it still asks you. the switch "/" , /q - tells it to do a quick format. if you want to see all the switches type is at the DOS prompt: format /?

Note that "quick format" doesn't actually wipe the disk -- it wipes the directory structures. Suitable software can still retrieve most of the files from the disk, though their names have been lost. If you really want to "wipe the disk", do a normal format. If you want a secure wipe, use one of the overwriting programs. (I use a short batch file which is slower but easy to recreate and "probably good enough.")

Here 'tis, though line wrapping may be a problem. The concept is that it overwrites unused sectors of the disk (which, if you apply it after formatting the disk, is just about all of the disk) by using an endlessly growing file. The process of growing the file involves copying the data between files, so when you're done much of the disk has been overwritten repeatedly and is thus pretty darned secure; the rest has been overwritten once which is good enough for most purposes. Note that since this only affects unused sectors, it can be run at any time if you want to clean up your "leftovers"; it won't damage existing files. It isn't particularly fast. It isn't particularly sophisticated. But I consider it good enough for cleaning a disk before I dispose of it. Your needs may vary. And because it is so simple in concept, I can recreate it quickly from scratch if I need it on a machine where I don't have a copy. rem zapfree.bat -- public domain code, courtesy of ORK Security Services echo %RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM% >a echo This sector has been securely (and repeatedly) wiped. >>a echo %RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM% >>a echo Get your nose out of it. >>a :loop echo %RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM% >>a dir a copy /y a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a b if not exist b goto :done echo %RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM%%RANDOM% >>b dir b copy /y b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b+b a if exist a goto :loop :done del a b

Just noticed that line wrapping did indeed do a number on it... Oh well.

Since nobody complained, I'm assuming nobody cares.

soz: if you want to see all the switches type at the DOS prompt:

Like kevin said most DOS processes of this type will have a /? for help
Note the /X switch, it may be useful


It forces the volume to dismount (if necessary). While I'm not really sure exactly what that means, I'm assuming that the format may be blocked if things are using the volume, so it "disconnects" and screws them so it can format anyway.



Your friend's not going to like you after you do this to him, or you school is going to kick you out for this.