用Defraggler打造自己的免费自动磁盘整理工具

1,安装Defraggler

2,在安装目录下找到df.exe文件记录下路径以替换一下df.exe程序的路径

3,自动"整理磁盘.bat"

 

@echo off title 磁盘碎片整理 color b4 echo 正在进行磁盘整理,请稍后。。。 echo. echo 需要整理的磁盘有: "D:/Program Files/Defraggler/df.exe" /L echo. echo 开始整理C盘 "D:/Program Files/Defraggler/df.exe" C: echo. echo 开始整理D盘 "D:/Program Files/Defraggler/df.exe" D: /Large *.* 300 echo. echo 开始整理E盘 "D:/Program Files/Defraggler/df.exe" E: /shutdown /Large *.* 200 echo. echo 整理完毕! echo. echo 开始关机! echo. rem "D:/Program Files/Defraggler/df.exe" /shutdown pause  

 

Defraggler 命令行使用说明:

========================================

Defraggler (Command-Line Version)

Usage:
df /?
df /L [/debug]
df <drive> [/debug] [/Shutdown] [[/Large <file type> <size>] ...]
df <item> [<item>] [/S] [/debug] [/Shutdown]

  /?          Show this message.
  /L          List all supported drives.
  <drive>     Defrag drive.
  <item>      Defrag file or folder. This option can be set multiple times, but
              all items must be on the same drive.
  /S          Recurse into subfolders.
  /Shutdown   Shutdown system after defragmentation is complete.
  /Large      Move files of type <file type> greater than <size> MB to the end
              of the drive.
  /QD         Quick defrag drive.

Examples:

df C:
    Defrag drive C:

df C: /QD
    Quick defrag drive C:

df "C:/Program Files"
    Defrag "C:/Program Files" folder.

df C: /Large *.* 150
    Defrag drive C: and move all files greater than 150 MB to the end
    of the drive.

df C: /Large *.zip 150 /Large *.avi 150 /Large *.mkv 300
    Defrag drive C: and move following file types to the end of the drive:
       - *.zip files greater than 150 MB
       - *.avi files greater than 150 MB
       - *.mkv files greater than 300 MB

df "C:/Program Files" /S
    Defrag "C:/Program Files" folder and recurses into sub folders.

df "C:/Windows/*.exe" /Shutdown
    Defrag all executables inside "C:/Windows" folder and shutdown system
    when finished.

 

 

你可能感兴趣的:(c,File,System,工具,磁盘,Types)