Sinisterly
Defrag your disk using batch file [DiamonD.ZeuS Tutorial] - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Computers (https://sinister.ly/Forum-Computers)
+--- Forum: Operating Systems (https://sinister.ly/Forum-Operating-Systems)
+--- Thread: Defrag your disk using batch file [DiamonD.ZeuS Tutorial] (/Thread-Defrag-your-disk-using-batch-file-DiamonD-ZeuS-Tutorial)



Defrag your disk using batch file [DiamonD.ZeuS Tutorial] - DiamonD.ZeuS - 02-11-2014

Hello Smile

Recently, I enjoyed defrag my disk using batch file . Which is more easy for me .
Actually, it's just the same if you opened the Disk Defragmenter . But this is more easier and automated . Ok, let's start.

STEP 1
Make a new .txt file (which you will save as .bat later)

STEP 2
*READ THE CODE INFO AT THE END OF THIS POST IF YOU WANT TO CHANGE THE CODE*

Paste this code :
Code:
@echo off defrag /C /H /U /V
This is the code that I use.

STEP 3
Save it as .bat file.

/MORE INFO ABOUT THE CODE/

If you want to change the code that I've posted, follow these steps.

STEP 1 : Open up Command Prompt (Start+R . Type CMD and Click OK)
STEP 2 : type 'defrag' (without quotes) and hit Enter

You will see all the details about the code and commands .

Good luck Smile


RE: Defrag your disk using batch file [DiamonD.ZeuS Tutorial] - chmod - 02-11-2014

I fail to see how this differs from using the task scheduler instead of running the batch script Windows will launch the defrag utility when specified simple set up and forget


RE: Defrag your disk using batch file [DiamonD.ZeuS Tutorial] - secapps - 05-28-2014

how different bw defrag by third party soft and cmd?


RE: Defrag your disk using batch file [DiamonD.ZeuS Tutorial] - Inori - 05-28-2014

@chmod is right. The defrag command is no different from the actual program. It's just running through command prompt.
This is actually the case for a good chunk of batch commands. They're just emulated through the terminal but they're really their corresponding windows/linux/whatever command.
(Someone might want to move this to batch, by the way)


RE: Defrag your disk using batch file [DiamonD.ZeuS Tutorial] - chmod - 05-28-2014

(05-28-2014, 12:06 PM)Jinxed Wrote: @chmod is right. The defrag command is no different from the actual program. It's just running through command prompt.
This is actually the case for a good chunk of batch commands. They're just emulated through the terminal but they're really their corresponding windows/linux/whatever command.
(Someone might want to move this to batch, by the way)

It's actually the opposite, the defrag program is just a graphical front end for the command and relevant switches. This is how most GUI tools are. They are built for 5 he command line and then the GUI is added later.


RE: Defrag your disk using batch file [DiamonD.ZeuS Tutorial] - gioo1331 - 05-28-2014

To my mind, Disk Defrag was useful for windows xp. For windows 7 it's not useful. This is my mind.


RE: Defrag your disk using batch file [DiamonD.ZeuS Tutorial] - chmod - 05-28-2014

(05-28-2014, 04:52 PM)gioo1331 Wrote: To my mind, Disk Defrag was useful for windows xp. For windows 7 it's not useful. This is my mind.

defragmenting a hard drive is still essential on a Windows machine if you want to keep it running well because of the way it stores files NTFS (and the more or less redundant FAT32) does not allocate enough clusters on the drive to allow for expansion and modifications, so after a while you end up with files split across multiple parts of the drive. All defragmenting does is to rearrange this data so that they are on continuous clusters and as such reduces the amount of time it takes for your drive to read these files.