MyDefrag might be semi-extinct, but it remains the only program of its kind that can optimize your hard disk precisely the way you want it. Like all defragmenters, it reorganizes all parts of your files, packing them together, fixing the low performance when spread all over the surface issue. It also allows you to set up zones, placing your most important files to the faster, outer region of the HDD’s surface. You just have to tell it what goes where through a simple script.

Locate, download and install MyDefrag

Unfortunately, MyDefrag is unsupported nowadays, and its official site is dead. You can still find it, though, at popular software hosting sites, like FileHippo and MajorGeeks. Download and install the last ever version of the program, MyDefrag 4.3.1. Accept all defaults during the installation and make sure “Select and activate the MyDefrag ScreenSaver” is deselected.

Create a new script

You don’t control how MyDefrag operates through a graphical interface or command-line options – it’s done with simple scripts. Locate the sub-folder scripts, that exists for this purpose in its installation directory. Right-click in this directory and create a new, blank TXT file. Give it any name you please, but change its extension to “MyD,” the default for MyDefrag scripts. Then, open it in your favorite text editor.

Script intro

We’ll use the existing ones as the base for a script that optimizes a hard disk filled with games, putting the files that affect their performance more than others at the quicker parts of the disk’s surface, moving the less essential and not-frequently-accessed data to the other end. The first part of your script should set things up as follows. Note that you should place every parameter and command on a new, individual line. Also note that we will use comments in the code – they start with “//” – to explain the more cryptic bits of our script.

Set up your first zone

By splitting the HDD surface into zones, MyDefrag allows you to place specific files and folders on the parts of its surface that perform better or worse. Set up zones by selecting what should go in them:

Setting up more zones

MyDefrag can only pack together your files, like other defragmenters, if you don’t set up any Zones, but you’ll be missing out on the whole point of its use. We set up more zones as follows:

Final script

What follows here is the whole final script. Feel free to copy and paste it into your own script, then tweak it as you wish.

Create a low-priority file list

Remember how we told our script to take into account a low priority files list, in TXT format, before organizing our files? Now’s the time to create that file. Right-click in the scripts folder and create a new, blank TXT file. Name it “file_list.txt” – the same filename we used in the script itself. Here’s a sample list you can copy and use. Change the directories and files to ones you don’t care about.

Run your script

With the two files that define your defragmentation logic ready, it’s time to put them to the task! Run MyDefrag and, if there’s no typo anywhere, your script should show up among the default scripts in the program’s list. Select it from the “Select a script” list. Then, as MyDefrag states, “Select 1 or more disks” from the second list you’d like to defragment based on your script’s rules. Click “Run” and give it some hours (or days, for Terabyte-large HDDs) to work its magic. That’s it. You have defragmented and optimized your hard disk the way you want it, and it should be working better and faster now.