How to automate diskdefragmentation

jpchint

New member
Member
VIP
Local time
3:01 AM
Messages
166
Location
India
Hi sevenforums,

How can I automate disk defragmentation(assuming with task scheduler) if my fragmentation reaches 30% for C drive?
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
LENOVO G570
OS
windows 7 ultimate 64 bit
CPU
Intel core i3-2350M cpu@!2.30 Ghz
Motherboard
Lenovo
Memory
4.00 GB
Graphics Card(s)
AMD RADEON HD 6370M(1GB)
Monitor(s) Displays
Generic pnp Monitor
Screen Resolution
1366*768
Hard Drives
ST9500325AS ATA device(500GB) NTFS
Keyboard
Standard ps/2 keyboard
Mouse
synaptics ps/2 port Touchpad
Internet Speed
921.6 kbps(Dial up Connection)
Antivirus
Quick Heal,MSE
Browser
Opera,Chrome
Hi JP,

Task scheduler does not have a run when X% reached, so it would have to be time based ie monthly.


Note
SSD's should NOT be defragged.


Roy
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
medionl/Aspire 6930G/acer x55a
OS
W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
CPU
E5300 dual core
Motherboard
medion MS7366
Memory
3gb
Graphics Card(s)
Nvidia Geforce 7100 Nforce 630i
Monitor(s) Displays
avixc
Internet Speed
n (isp resticted to 72)
Antivirus
mse/pands
Browser
palemoon
Other Info
Belkin Fd7050 n USB using Railink RT2870 drivers, more upto date
Windows 7, by default, defrags your Hard Drive (HDD) via task scheduler, it is disabled, by default, with Solid State Drive (SSD).
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP Desktop & Compaq Laptop
OS
Win 10 x64, Linux Lite, Win 7 x64, BlackArch, & Kali
Hard Drives
Samsung 850 Pro 256Gb,
Hitachi HDD 1Tb,
Crucial MX SSD 250Gb
Segate 3Tb USB 3.0 Ext. Backup HDD
Internet Speed
150Mbps dn, 20Mbps up
Antivirus
Avast Free, Malwarebytes Anti-Exploit & Anti-Ransomware
Browser
Firefox, Chrome, Opera, & VPN
Hi JP,

Task scheduler does not have a run when X% reached, so it would have to be time based ie monthly.


Note
SSD's should NOT be defragged.


Roy

Thanks Mr.Torchwood for reply.....
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
LENOVO G570
OS
windows 7 ultimate 64 bit
CPU
Intel core i3-2350M cpu@!2.30 Ghz
Motherboard
Lenovo
Memory
4.00 GB
Graphics Card(s)
AMD RADEON HD 6370M(1GB)
Monitor(s) Displays
Generic pnp Monitor
Screen Resolution
1366*768
Hard Drives
ST9500325AS ATA device(500GB) NTFS
Keyboard
Standard ps/2 keyboard
Mouse
synaptics ps/2 port Touchpad
Internet Speed
921.6 kbps(Dial up Connection)
Antivirus
Quick Heal,MSE
Browser
Opera,Chrome
Hello jpchint, do you have any PowerShell scripting experience?

Is this article any use to you: Use PowerShell to Determine Fragmentation of your Drive?

Article suggests accessing WMI method DefragAnalysis, and querying the TotalPercentFragmentation member to achieve your scripting goal.
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 x64, Vista x64, 8.1 smartphone
CPU
Intel E8400 65W 64-bit
Motherboard
Gigabyte EP45-UD3LR
Memory
DDR2 2 x 2GB, 1GB x 2
Graphics Card(s)
XFX Radeon HD5750
Sound Card
AMD High Definition Audio; Realtek High Definition Audio
Monitor(s) Displays
iiyama prolite X2377HDS
Screen Resolution
1920 x 1080
Hard Drives
500GB 7200 rpm Seagate ST3500413AS 16MB, 500GB 5400 rpm Toshiba MQ02ABF050H 32MB, 200GB 7200 rpm Seagate ST3200820AS 8MB, 2TB 7200 rpm Western Digital WD20EZRX 64MB
PSU
Enermax Liberty Modular
Case
Antec P193 Midi Tower
Keyboard
Mionix ZIBAL 60
Mouse
Razer USB 2.0 Diamondback Mouse or Huion Graphics Tablet
Browser
Internet Explorer, Lunascape, Firefox, Opera, Avast Safezone

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
LENOVO G570
OS
windows 7 ultimate 64 bit
CPU
Intel core i3-2350M cpu@!2.30 Ghz
Motherboard
Lenovo
Memory
4.00 GB
Graphics Card(s)
AMD RADEON HD 6370M(1GB)
Monitor(s) Displays
Generic pnp Monitor
Screen Resolution
1366*768
Hard Drives
ST9500325AS ATA device(500GB) NTFS
Keyboard
Standard ps/2 keyboard
Mouse
synaptics ps/2 port Touchpad
Internet Speed
921.6 kbps(Dial up Connection)
Antivirus
Quick Heal,MSE
Browser
Opera,Chrome
Back
Top