Need Help: Defrag in Dos?

The_Dominion

Limp Gawd
Joined
Jul 6, 2001
Messages
337
My hard drive unexpectedly died, and I want to repartition my other drive so I can install windows, the drive was originally formatted for XP. Problem is I need to defrag first to have any hope of resizing the partitions. I tried using the ME startup disk I have, no defrag was present there. Then I tried to find a DOS image, but I can't find one with defrag.exe. What can I do?
 
BTW I am doing things right? There isn't any other way to install windows on my second hard drive without having to delete the entire drive, is there? I still need a defrag, I can't even find any 3rd party DOS based defraggers.
 
DEFRAG
Type: External (6.0 and later)

Syntax:

DEFRAG [d:] [/F][/S[:]order] [/B][/skiphigh [/LCD|/BW|/GO] [/H]
DEFRAG [d:] [/V][/B][/skiphigh] [/LCD]|/BW|/GO] [/H]

Purpose: Optimizes disk performance by reorganizing the files on the disk (new with DOS Version 6).


Discussion
You should start DEFRAG only from MS-DOS. Starting DEFRAG from a program such as Microsoft Windows may cause you to lose data. The following is a list of DEFRAG exit codes:

0 The defragmentation was successful.
1 An internal error occurred.
2 The disk contained no free clusters. To operate, DEFRAG needs 1 free cluster.
3 The user pressed CTRL+C to stop the process.
4 A general error occurred.
5 DEFRAG encountered an error while reading a cluster.
6 DEFRAG encountered an error while writing a cluster.
7 An allocation error occurred. To correct the error, use the SCANDISK command.
8 A memory error occurred.
9 There was insufficient memory to defragment the disk.


Options
/F - Used to defragment files, ensuring that the disk contains no empty spaces between files.

/U - Used to defragment files, leaving empty spaces between files.

/S - Used to control the way in which files are sorted in their directories. Without this option, the current order of files will be maintained. You can use any combination of the following sort options . Do not put spaces between the values.

N Alphabetical order by name.
N- Reverse alphabetical order by name.
E Alphabetical order by extension.
E- Reverse alphabetical order by extension.
D By date and time, earliest first.
D- By date and time, latest first.
S By size, smallest first.
S- By size, largest first

/B - Used to restart your computer after files have been reorganized.
/skiphigh Used to load DEFRAG into conventional memory, rather than in upper memory.

/LCD - Specifies an LCD color scheme.
/BW - Specifies a black and white color scheme.
/GO - Used to disable the graphic mouse and graphic character set.
/H - Used to move hidden files.


Example
If you want to load DEFRAG into conventional memory and run it specifying that the files on drive C be sorted alphabetically by name, enter the following:

defrag c: /f /sn /skiphigh

Google is your friend.

http://www.easydos.com/defrag.html
 
what the hell are you talking about, need to defrag before partitioning? if youre trying to save the stuff thats on when resizing, yeh thats a good idea. if youre just resizing and the stuffs gone, it really does NOT matter.
 
First off, not only did I search google for over 3 hours for an actual Defrag program, that information I already knew.

On my hard drive I have about 30GB of free space, but according to the repartitioner, the current partition is taking up all the space. It says this is because there are files at the end of the drive. So I need to defrag to put all the files at the begining of the drive, and use the space I have available.

Thanks for trying.
 
Unless you are using the FAT16 file system, I don't think you have a chance of using defrag from DOS. I don't think it will work on anything other than a FAT16 file system. Defrag from Win95 or 98 might do it if you were using the FAT32 file system. You said that you formatted the drive for XP so more than likely you are using the NTFS file system. I don't remember which version that is but I think it's different from the NT4 NTFS. In other words, your probably SOL as far as defragging goes unless you toss your drive in another WinXP system and try to defrag that way. Your best bet would be to toss your drive in another WinXP system and backup all of the stuff on the drive, wipe the drive, and then use the WinXP CD to repartition the space on the drive.
 
1. Put drive in another win2k/xp computer.

2. Defrag at your leisure

3. .....

4. Profit.
 
OK, well problem is, I have no other XP machine, or even a 9x machine for that matter. I formmated on XP, but it is using FAT 32. All I have at my house is a HP Laptop with ME, a Emachines ME, and a Linux machine. Nor do I have the access to any other computer, to where I could put the hard drive in.
 
Back
Top