硬盘驱动器的主要部件是它们的旋转盘片和在其上读写数据的磁头。 由于物理学教给我们的知识,这些盘形盘片的外部具有更快的线性加速度。 此外,当数据遍布其表面时,会产生可感知的性能成本。
MyDefrag 可能是半灭绝的,但它仍然是同类程序中唯一可以按照您想要的方式精确优化硬盘的程序。 像所有碎片整理程序一样,它会重新组织文件的所有部分,将它们打包在一起,修复在表面问题上分散时的低性能。 它还允许您设置区域,将最重要的文件放置到 HDD 表面更快的外部区域。 你只需要通过一个简单的脚本告诉它去哪里。
不幸的是,现在不支持 MyDefrag,它的官方网站已经死了。 不过,您仍然可以在流行的软件托管网站上找到它,例如 文件河马 和 专业极客.
下载并安装该程序的最新版本 MyDefrag 4.3.1。 在安装过程中接受所有默认设置并确保取消选择“选择并激活 MyDefrag 屏幕保护程序”。
创建一个新脚本
您无法通过图形界面或命令行选项控制 MyDefrag 的运行方式——它是通过简单的脚本完成的。 在其安装目录中找到为此目的而存在的子文件夹脚本。
右键单击此目录并创建一个新的空白 TXT 文件。 给它起任何你喜欢的名字,但将它的扩展名更改为“MyD”,这是 MyDefrag 脚本的默认值。 然后,在您喜欢的文本编辑器中打开它。
脚本介绍
我们将使用现有文件作为脚本的基础,优化充满游戏的硬盘,将影响其性能的文件比其他文件更多地放在磁盘表面的较快部分,移动不太重要和不经常 -访问数据到另一端。
脚本的第一部分应按如下方式进行设置。 请注意,您应该将每个参数和命令放在一个新的单独的行上。 另请注意,我们将在代码中使用注释——它们以“//”开头——来解释我们脚本中更神秘的部分。
Title("Title of your script") Description("Short description of your script") WriteLogfile("MyDefrag.log","LogHeader") VolumeSelect CommandlineVolumes() VolumeActions AppendLogfile("MyDefrag.log","LogBefore")
设置您的第一个区域
通过将 HDD 表面分成多个区域,MyDefrag 允许您将特定文件和文件夹放置在其表面上性能更好或更差的部分。
通过选择应该进入的区域来设置区域:
// Zone 1 - Non-important, slow files FileSelect // Select specific files. !include "file_list.txt"! // Select the files defined in file_list.txt. FileActions // What MyDefrag will do with those files. MoveToEndOfDisk() // Move them to slower portion of the HDD since they are the unimportant ones AddGap(ZoneEnd + VolumeFree * 0.1 // Add a 0.1% size gap between that zone and the next one FileEnd // End file selection for the specific zone
设置更多区域
如果您不设置任何区域,MyDefrag 只能像其他碎片整理程序一样将您的文件打包在一起,但您将错过它的全部使用点。
我们设置了更多的区域如下:
// Zone 2: Put directories together, for quicker listing of the HDD's contents - same syntax as before FileSelect Directory(yes) // Define that we want to select directories, not files. FileActions SortByName(Ascending) // Sort them by alphabetical order. AddGap(ZoneEnd + VolumeFree * 0.05) FileEnd // Zone 3: Typical, popular "game filetypes", for quicker game launching FileSelect Filename("_.exe") OR Filename("_.dll") OR Filename("_.ini") OR Filename("_.conf") OR Filename("_.cfg") OR Filename("_.bat") OR Filename("_.ico") FileActions SortByName(Ascending) AddGap(ZoneEnd + VolumeFree * 0.1) FileEnd // Zone 4: Place the MFT and other special NTFS files right after our most important files FileSelect SelectNtfsSystemFiles(yes) FileActions PlaceNtfsSystemFiles(Ascending,MftSize * 0.01) // Move the selected NTFS system files and set the MFT to a %0.01 size. AddGap(ZoneEnd + VolumeFree * 0.01) FileEnd // Zone 5: Recently accessed files (for better performance of last games played). FileSelect LastAccessEnabled(yes) and LastAccess(60 days ago,now) FileActions SortByName(Ascending) AddGap(ZoneEnd + VolumeFree * 0.3) FileEnd // Zone 6: all other files. FileSelect all FileActions SortByName(Ascending) AddGap(ZoneEnd + VolumeFree) FileEnd
最终脚本
下面是整个最终脚本。 随意将其复制并粘贴到您自己的脚本中,然后根据需要对其进行调整。
Title("Make Tech Easier's Games HDD Monthly") Description("Optimize Game HDDs by moving temp, downloading, and non-important gaming-related files and directories to its end, leaving the faster HDD space for more important stuff.") // Write the header to the logfile. See the "Settings.MyD" file for the definition of the "LogHeader" string. WriteLogfile("MyDefrag.log","LogHeader") // Select and process the volumes one by one. VolumeSelect CommandlineVolumes() VolumeActions // Write the "before" statistics to the logfile. See the "Settings.MyD" file for the definition of the "LogBefore" string. AppendLogfile("MyDefrag.log","LogBefore") // Zone 1 - Place Non-important, temp and ultra-large files at the end of the disk. FileSelect !include "file_list.txt"! FileActions MoveToEndOfDisk() AddGap(ZoneEnd + VolumeFree * 0.1) FileEnd // Zone 2: Directories. FileSelect Directory(yes) FileActions SortByName(Ascending) AddGap(ZoneEnd + VolumeFree * 0.05) FileEnd // Zone 3: Main Game Files (for quicker game launch). FileSelect Filename("*.exe") OR Filename("*.dll") OR Filename("*.ini") OR Filename("*.conf") OR Filename("*.cfg") OR Filename("*.BAT") OR Filename("*.ico") FileActions SortByName(Ascending) AddGap(ZoneEnd + VolumeFree * 0.1) FileEnd //Zone 4: Place the MFT and some other special NTFS files. FileSelect SelectNtfsSystemFiles(yes) FileActions PlaceNtfsSystemFiles(Ascending,MftSize * 0.01) AddGap(ZoneEnd + VolumeFree * 0.01) FileEnd // Zone 5: Recently accessed files (for better performance of last games played). FileSelect LastAccessEnabled(yes) and LastAccess(60 days ago,now) FileActions SortByName(Ascending) AddGap(ZoneEnd + VolumeFree * 0.3) FileEnd // Zone 6: all other files. FileSelect all FileActions SortByName(Ascending) AddGap(ZoneEnd + VolumeFree) FileEnd // Write the "after" statistics to the logfile. See the "Settings.MyD" file for the definition of the "LogAfter" string. AppendLogfile("MyDefrag.log","LogAfter") VolumeEnd // Write the footer to the logfile. See the "Settings.MyD" file for the definition of the "LogFooter" string. AppendLogfile("MyDefrag.log","LogFooter")
创建低优先级文件列表
还记得我们如何告诉我们的脚本在组织文件之前考虑低优先级文件列表(TXT 格式)吗? 现在是创建该文件的时候了。
右键单击脚本文件夹并创建一个新的空白 TXT 文件。 将其命名为“file_list.txt”——与我们在脚本本身中使用的文件名相同。
这是您可以复制和使用的示例列表。 将目录和文件更改为您不关心的目录和文件。
DirectoryName("Game_I_never_play_after_installing") OR DirectoryName("Another_game_I_keep_but_rarely_play") OR DirectoryName("Game_that_takes_up_almost_half_the_HDD") OR Filename("vc_redist.x64.exe") OR Filename("vcredist_x64.exe") OR Filename("vcredist_x64*.exe") OR Filename("*.iso") OR Filename("*.isz") OR Filename("*.mdf") OR Filename("*.cdi") OR Filename("*.pdf") OR Filename("*.bik") OR Filename("*.avi") OR Filename("*.wmv") OR Filename("*.bk2") OR Filename("*.mp4") OR Filename("*.rar") OR Filename("*.zip") OR Filename("*.7z") OR Filename("*.7z.*")
运行你的脚本
准备好定义碎片整理逻辑的两个文件后,就可以开始执行任务了! 运行 MyDefrag,如果没有任何拼写错误,您的脚本应该会显示在程序列表中的默认脚本中。
从“选择脚本”列表中选择它。 然后,正如 MyDefrag 所述,从第二个列表中“选择 1 个或多个磁盘”,您希望根据脚本规则进行碎片整理。 单击“运行”并给它几个小时(或几天,对于 TB 级大型 HDD)来发挥它的魔力。
就是这样。 您已经按照您想要的方式对硬盘进行了碎片整理和优化,现在它应该可以更好更快地工作了。
- 对驱动器进行碎片整理时会发生什么?
- 5 个提高 Windows 10 硬盘性能的工具
- 如何从 Windows 的上下文菜单对硬盘进行碎片整理
订阅我们的新闻!
我们最新的教程直接发送到您的收件箱
注册所有时事通讯。 注册即表示您同意我们的隐私政策并且欧洲用户同意数据传输政策。 我们不会共享您的数据,您可以随时取消订阅。 订阅