Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Windows cmd.exe Command-Prompt ► ««« »»»

Optimize drives about the command prompt on MS Windows OS!


Yes, and it's easy to optimize drives on Windows 11, 10, ... from the command prompt using the defrag command!



Everyone probably knows the drive optimization under Windows  because it is an age-old function if you like to take matters into your own hands, you may want to do it with one click. Why not if it is practical and possible.


1.) ... Drive optimization by command via the command prompt!
2.) ... The drive optimization via batch file as a 1-click solution desktop!
3.) ... The drive optimization in QTP as a keyboard shortcut!
4.) ... How to optimize drives in PowerShell!
5.) ... Why should you use it, but there is automatic drive optimization?



1.) Drive optimization by command via the command prompt!

As always, start the command prompt or the ColorConsole with administrative rights!
 

Example 1: Optimizing drive c: d: e: f: and v: 


defrag c: d: e: f: v: /o


Example 2: Optimize drive c: only


defrag c: /o


Example 3: Optimize all drives


defrag /C /O


This is how it looks from Windows + R command cmd  shortcut: Ctrl + Shift + Enter 


(Image-1) Optimize drives about the command prompt on MS Windows OS!
Optimize drives about the command prompt on MS Windows OS!

-
▲ Back to the top ▲




2.) Drive optimization via batch file as a 1-click desktop solution!


optimize.bat

defrag c: d: e: f: v: /o


1. Start Notepad 

2. Text:  defrag c: d: e: f: v: /o

3. Save the file as %userprofile%/Desktop/optimize.bat

4. Right-click as administrator

(... see Image-2 Point 1 to 6) 


(Image-2) Optimize drives via script ergo batch file!
Optimize drives via script ergo batch file!


-
▲ Back to the top ▲


3.) The drive optimization in QTP as a keyboard shortcut!


runa: cmd.exe / k "defrag c: d: e: f: v: / o" 

read about this: ►► runx, runa in QTP

(... see Image-3) 

(Image-3) Optimize drives via QTP shortcut!
Optimize drives via QTP hotkey!


-
▲ Back to the top ▲



4.) How to optimize drives in PowerShell!



1. Start Windows + R PowerShell with  Ctrl + Shift + Enter

2. Command: Optimize-Volume -DriveLetter C -Analyze-Verbose

(... see Image-4 Point 1 to 3) 

(Image-4) Optimize drives with PowerShell!
Optimize drives with PowerShell!

-
▲ Back to the top ▲



5.) Why should you use it, but there is automatic drive optimization?

The automatic drive fragmentation / optimization can be a possible cause that the system becomes slow and sluggish, external USB hard drives are mostly not optimized, but fragmented, even if they are SSD. Fragmenting is quite time consuming! See: ►  Defragment or optimize !

Here the MS Explorer in the task manager is at 100% and you don't know why. As I said it is often the automatic drive fragmentation / optimization!







FAQ 124: Updated on: 8 May 2022 11:50 Windows
Windows-Console

Map network drives via the command prompt under Windows!


Connecting or disconnecting network drives via the command prompt under Windows 11, 10, or MS Server without mouse clicks is a very practical option
Windows-Console

Export a list of running processes as a text file with cmd.exe!


Its easy to export a list of running processes as a text file using the command prompts cmd.exe on Windows 11, 10, etc 1. exporting the running
Windows-Console

Generate file hash via command prompt!


Sometimes you need the SHA value of a file, in the command prompt you can create a file hash under Windows 11, 10, Hash algorithms: MD2 MD4 MD5 SHA1
Windows-Console

Adjust lock screen duration from command prompt!


Adjust lock screen duration from command prompt is a little-known option on Windows 11, 10, and MS Server OS   Content: 1. The lock screen display
Windows-Console

Directly open command prompt in each folder!


Here is the solution to open the command prompt directly in each folder without much effort on all Windows 11, 10, and MS Server operating systems  
Windows-Console

Find out programs that start with Windows via the command prompt?


You can find out programs that start with Windows via the classic command prompt on all MS Windows OS Everyone probably knows the practical ►  Autostart
Windows-Console

Change directory or drive in command prompt!


Sometimes you just need to change directory or even drive in Command Prompt on all MS Windows Desktop and Server OS Everyone probably knows how easy it

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, console, optimize, drives, about, command, prompt, easy, defrag, drive, optimization, Questions, Answers, Software




    

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + Desktop.Calendar.Tray.OK
  + OK.Its.Raining.Men
  + Run-Command
  + MagicMouseTrails
  + CpuFrequenz
  + MultiClipBoardSlots
  + OnlyStopWatch
  + KeepMouseSpeedOK
  + NonCompressibleFiles
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Windows 2021 | Windows 10 | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2023 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu
0.061


► What is Virtual Memory? ◄

► Why is in Desktop-OK the volume mixer? ◄

► Translate the Find.Same.Images.OK in my Language! ◄

This website uses cookies to ensure you get the best experience on our website more Infos & Privacy Policy
....