MSFN Forum: defrag.exe "-g" switch - MSFN Forum

Jump to content



Windows Vista Forum Rules

If you have questions about customizing Windows Vista that are vLite-specific, please post them in the vLite forum, not here. If you have questions regarding the unattended installation of Windows Vista, please post them in the Unattended Windows Vista/Server 2008 section.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

defrag.exe "-g" switch Rate Topic: -----

#1 User is offline   Quark Fusion 

  • Newbie
  • Group: Members
  • Posts: 14
  • Joined: 18-January 07

  Posted 02 July 2008 - 04:05 AM

Did anyone know what it means? (It used in ScheduledDefrag task)


#2 User is offline   cluberti 

  • Gustatus similis pullus
  • Group: Supervisor
  • Posts: 10,936
  • Joined: 09-September 01
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 02 July 2008 - 06:36 AM

That's odd. My defrag.exe command in Task Scheduler is %windir%\system32\defrag.exe -c -i, which means the -i is not documented (but -c tells me I'm defragmenting all attached volumes):

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\thisuser>defrag /?
Description:  Locates and consolidates fragmented files on local volumes to
			  improve system performance.

Syntax:  defrag <volume> -a [-v]
		 defrag <volume> [{-r | -w}] [-f] [-v]
		 defrag	   -c [{-r | -w}] [-f] [-v]

Parameters:

Value		 Description

<volume>	  Specifies the drive letter or mount point path of the volume to
			  be defragmented or analyzed.

-c			Defragments all volumes on this computer.

-a			Performs fragmentation analysis only.

-r			Performs partial defragmentation (default). Attempts to
			  consolidate only fragments smaller than 64 megabytes (MB).

-w			Performs full defragmentation. Attempts to consolidate all file
			  fragments, regardless of their size.

-f			Forces defragmentation of the volume when free space is low.

-v			Specifies verbose mode. The defragmentation and analysis output
			  is more detailed.

-?			Displays this help information.

Examples:

defrag d:
defrag d:\vol\mountpoint -w -f
defrag d: -a -v
defrag -c -v

I did some searching and found that -i tells defrag.exe to pause when the machine is not idle (hence -i).

#3 User is offline   Quark Fusion 

  • Newbie
  • Group: Members
  • Posts: 14
  • Joined: 18-January 07

Posted 02 July 2008 - 10:17 AM

I read somewhere that -i switch means "work only if system is idle for few minutes", it's not documented because was added after freeze of language packs (still I don't understand why not update language packs, even if they can't do that before release they can do it with windows update)

BTW, my system is Vista x64 SP1.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy