• Please review our updated Terms and Rules here

DOS Utility to degragment HD

Ken Vaughn

Experienced Member
Joined
Jan 16, 2010
Messages
138
Location
Colorado, USA
Does anyone know of a DOS program which would perform the equivalent of the current Window's defrag utility? The system with the hard disk is running under DOS 3.3.
 
I don't think the Microsoft version is a Windows utility. I run it in DOS. Perhaps the version 6 won't run in DOS3.3 but you could put it on a boot disk and do it. Surely Norton has a universal version. I'll have to do a bit of testing.
 
Hmm, did you look to see what's available? I just looked in the most likely place where all these things are kept, and downloaded this:
Code:
ole@SCO:~$ ls -l *.zip
-rw-r--r-- 1 ole adm  29934 2010-12-02 16:15 dcu100.zip
-rw-r--r-- 1 ole adm 129350 2010-12-02 16:14 dkcare40.zip
-rw-r--r-- 1 ole adm  50874 2010-12-02 16:15 dog316.zip
-rw-r--r-- 1 ole adm   3554 2010-12-02 16:16 dogrevu.zip
-rw-r--r-- 1 ole adm   1545 2010-12-02 16:16 gdfrag.zip
-rw-r--r-- 1 ole adm  68783 2010-12-02 16:15 org30sw.zip
-rw-r--r-- 1 ole adm  15719 2010-12-02 16:17 reform12.zip
-rw-r--r-- 1 ole adm  43623 2010-12-02 16:17 reform16.zip
-rw-r--r-- 1 ole adm  69118 2010-12-02 16:17 safpak21.zip
There's got to be a couple of those which will work. I'll be testing after lunch. :)
 
Scandisk does defragmentation? The help file doesn't say anything about that. Anyway, defrag which was introduced with DOS-6.0, may run on older hardware but wants MS-DOS 6.0 and up, so it will need a way around that.

Now regarding my recent download. Here is what I have to report.

DCU100 - just a shortcut to progs and commands
DKCARE40 - looks like it uses MS software from the computer
DOG316 - looks pretty good - works on 8088 and PCdos3.2
DOGREVU - review of above
GDFRAG - a batch file for unattended use of dos defrag
ORG30SW - has gui similar to MS defrag. Has nag screens. Works on 8088 and PCdos3.2
REFORM12 - A text file line length reformat program - oops!
REFORM16 - Defragger that doesn't work on my newer DOS system - untested on old.
SAFPAK21 - Died with fault on ramdrive of new system - untested on old.

So, it looks like there are at least a couple of options that work without having to reboot. Good luck!
 
I use Microsoft Defrag. Not sure which version but circa '93
Runs fine under MS-DOS 3.30 for me.
 
I use Microsoft Defrag. Not sure which version but circa '93 Runs fine under MS-DOS 3.30 for me.
It's copyright by Symantec Corporation 1988-1993, so I'm sure there are lots of versions out there. Are you sure it's a Microsoft version you have? MS licensed it from Symantec and MS likes to make sure stuff complains about older versions in order to keep you upgrading. Like I said earlier, Microsoft introduced it with v6.0.


BTW, I forgot to suggest FreeDOS. (blush) All their stuff is pretty much compatible with all versions because they're not selling anything. I just tried their DEFRGX and it definately works under PCdos 3.2. However it won't run on an 8088 (I just tried), so I assume it needs 16 bit hardware. Try it - You'll like it. :)
 

Attachments

  • defragx.zip
    48.9 KB · Views: 3
It's copyright by Symantec Corporation 1988-1993, so I'm sure there are lots of versions out there. Are you sure it's a Microsoft version you have? MS licensed it from Symantec and MS likes to make sure stuff complains about older versions in order to keep you upgrading. Like I said earlier, Microsoft introduced it with v6.0.

BTW, I forgot to suggest FreeDOS. (blush) All their stuff is pretty much compatible with all versions because they're not selling anything. I just tried their DEFRGX and it definately works under PCdos 3.2. However it won't run on an 8088 (I just tried), so I assume it needs 16 bit hardware. Try it - You'll like it. :)

Picking up the matching Norton Utilities version is a good option. I think NU V 7 was released about the same time as DOS 6 but earlier releases back to version 4 included much the same defragmentation tool except for poor handling of compressed drives.

Much of Freedos's utilities used to require a 386. The code was supposed to run on a 286 or even 8086 but the compiler unneccessarily checked for 32 bit registers. Ooops. I haven't checked if all the latest updates have corrected this.
I wouldn't use the FreeDOS defrag. It is just too slow.
 
Last edited:
I wouldn't use the FreeDOS defrag. It is just too slow.

I didn't think of that. :( Anyway, just for a lark, I tried it to see:

Code:
G:\$ du -sb
97191617  G:\
G:\$ o:\defrag g:
Almost exactly 2 minutes later, it was finished. Is that fast or slow? I don't really know. Since I use DOS mostly for it's speed, I would call it slow. OTOH, I rarely do a defrag. This particular drive has never been done before and has been in use for over two years - so I suppose 2 minutes is tolerable.
 
The nice thing about DOS is that it didn't write to the disk nearly as much as Windows does, so it's less prone to fragmentation. Especially if you partition off a segment of your drive and redirect temp and tmp to a directory on that partition.

Speedisk.exe, the defragmenter from the Norton Utilities, is more versatile than the one bundled with DOS. Symantec didn't license the whole thing to MS. I used to sort the directories by file size, to get the largest files at the front of the directory, for a touch of additional speed. I was a freak about that kind of thing.

I think 2 minutes is pretty fast. On a full drive, I remember thorough defrags taking an hour or two. The good thing was you really only needed to do it once or twice a year, so I'd just run it before I went to bed and let it go overnight, so it could take however long it wanted.
 
MS-DOS DEFRAG requires at least DOS 6.0 in order to run, but it's really the same thing as the Speed Disk program from Norton Utilities 6.x with added support for compressed DoubleSpace / DriveSpace volumes. So for my older systems which run DOS 3.3, I use SPEEDISK from Norton Utilities 6.01, and it works perfectly.
 
MS-DOS DEFRAG requires at least DOS 6.0 in order to run
No it doesn't, or at least the version I have doesn't - the one that actually came with DOS 6.0

Regardless, there's nothing to stop you just booting DOS 6.0 off a floppy to run your defragger. After all, it's not something you should need to do every day. That's what I do for Scandisk, which definitely won't run under DOS 3.3
 
No it doesn't, or at least the version I have doesn't - the one that actually came with DOS 6.0

Regardless, there's nothing to stop you just booting DOS 6.0 off a floppy to run your defragger. After all, it's not something you should need to do every day. That's what I do for Scandisk, which definitely won't run under DOS 3.3
It has been my experience that MS makes the newer versions throw an error code when they find an older version environment. I believe this was pretty much universal - at least in my experience. I assume then that the version that came with 6.0 is different in this important aspect. That would be a refreshing change. :)

Looking at my version from 6.22 I find:
Code:
Incorrect DOS version
right in the code. Also in the code I see:
Code:
Copyright ��1992 by Symantec
To further identify the version:
Code:
DEFRAG   EXE        79,065 05-31-94   6:22a
DEFRAG   HLP         9,227 05-31-94   6:22a

I tried running it on 3.3 and it wouldn't go. One can only assume that the version that came with 6.0 is different.

That said. I agree with you retro. It is no problem to pop in a boot disk and run DEFRAG from there. For a once a year (likely less) event this is not particularly inelegant.
 
I wonder what happened to the OP? I think it would be polite to show up here. :) :) Hopefully he's OK and nothing bad has happened.

No, nothing bad has happened. Out of town and away from the computer for a few days. I meant to respond before I left, but the thread was still active. Thanks to everyone who responded.
 
Since nobody else seems to have mentioned it, there's also the DRDOS defragmenter, DISKOPT. DRDOS utilities don't seem to be so fussy about which version of DOS they run on.
 
Another one not mentioned is Vopt
I've still got Vopt 2.01 (1987) which even runs under DOS 2.0

The version of Microsoft Defrag I use under DOS 3.30
Code:
DEFRAG   EXE        75,033 3-10-93   6:00a
DEFRAG   HLP         9,227 3-19-93   6:00a

I also got Incorrect DOS version when I tried the later Defrag that came with DOS 6.22 so as an experiment, I wrote a little TSR to make DOS report 6.00 instead of 3.30
Code:
;
; VERSION6.ASM
;
; Intercept DOS Int 21h function 30h and return 6.00
;

CODE		SEGMENT BYTE PUBLIC
		ASSUME	CS:CODE, DS:CODE
		ORG	100H

ENTRY:		JMP	INIT
						
HOOK:		CMP	AH, 30H				; function 30h?
		JE	GETVER				; yes, handle locally
			
							; no, chain to DOS
		DB	0EAH				; jmp far
INT21		DD	0				; saved INT21 vector

GETVER:		MOV	AX, 6				; return version 6.00
		IRET

INIT:		MOV	AX, 3521H			; get original INT21 vector
		INT	21H

		MOV	WORD PTR INT21, BX		; and save it
		MOV	WORD PTR INT21 + 2, ES
		
		MOV	AH, 25H				; set new INT21 vector
		MOV	DX, OFFSET HOOK
		INT	21H

		MOV	DX, OFFSET INIT
		INT	27H				; terminate, stay resident

CODE		ENDS
		END	ENTRY

Using this, I was able to persuade Defrag to run, and it seemed to run to completion but failed to terminate correctly. Not sure whether it was just something funny with my system, or if they've changed it so that it really does need DOS 6.0
 
Back
Top