Logo
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
EPL Standings
 
 
Windows Server

Windows Server 2008 Server Core : Compressing Data with the Compact Utility

8/28/2012 6:20:46 PM
One of the advantages of using NTFS is the file compression feature that it includes. Using file compression means that you can store more information on a single hard drive. In addition, due to the manner in which hard drives work, you can experience a small performance gain by using compression (compaction). This utility uses the following syntax:
COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [filename [...]]

The following list describes each of the command line arguments.


/C

Compresses the specified files or directories. Using this command line switch on a directory marks it so that the system automatically compresses any files added afterward.


/U

Uncompresses the specified files or directories. Using this command line switch on a directory marks it so that the system doesn't compress any files added afterward.


/S[:
dir]

Performs the specified tasks on the current directory or the directory included as an argument and all subdirectories. The default is the current directory.


/A

Forces the system to work with files (compress, uncompress, or query) that have the hidden or system attributes. Normally, the system skips files with these attributes.


/I

Forces Compact to continue performing tasks even after it experiences an error. Normally, Compact stops performing tasks when it encounters an error. Using this command line switch allows a batch file to continue processing files, even when some of the files failed to react as anticipated. You should redirect the output to a log file when using this option to track the errors and take any required remedial action when the task completes.


/F

Forces the compression operation on all specified objects, even those that the system has already compressed. Normally, the system skips any files that are already compressed. You may have to use this switch when working with files in some instances.


/Q

Reports only essential information such as errors, rather than general information including success messages.


filename

Specifies the file or directory name to work with. You can use all of the standard wildcard combinations to specify multiple files or directories. 

When used by itself, the Compact utility displays the current compaction state of files in the current directory, as shown in Figure 1. You can supply a directory without any other arguments to see the compaction state of files in other directories. The utility shows all compacted files with a C; all normal files have a space in place of the C. In addition to the compaction state, the standard output includes the actual file size, the compacted file size, and the compaction ratio. Unlike other utilities, Compact doesn't use a tabular format—each line contains a continuous entry that shows the information used to determine the compaction ratio. The bottom of the display shows the statistics for the directory including the number of compacted files, the actual and compacted size of all of the files, and the compaction ratio for the directory as a whole.

Figure 1. Use the Compact utility to discover how much space you save by using this feature.
Top Search -----------------
- Windows Server 2008 R2 : Work with RAID Volumes - Understand RAID Levels & Implement RAID
- Windows Server 2008 R2 Administration : Managing Printers with the Print Management Console
- Configuring Email Settings in Windows Small Business Server 2011
- Windows Server 2008 R2 : Configuring Folder Security, Access, and Replication - Implement Permissions
- Monitoring Exchange Server 2010 : Monitoring Mail Flow
- Windows Server 2008 R2 :Task Scheduler
- Windows Server 2008 R2 : File Server Resource Manager
- Windows Server 2008 R2 : Installing DFS
- Exchange Server 2010 : Managing Anti-Spam and Antivirus Countermeasures
- Windows Server 2008 R2 : Configuring Folder Security, Access, and Replication - Share Folders
Other -----------------
- Windows Server 2008 Server Core : Encrypting Data with the Cipher Utility
- Active Directory Domain Services 2008 : Deactivate Classes, Activate Classes
- Active Directory Domain Services 2008 : Configure Attribute Range, Create Classes
- Microsoft Dynamics AX 2009 : Working with Data in Forms - Adding images to records
- Microsoft Dynamics AX 2009 : Working with Data in Forms - Coloring records
- SQL Server 2008 : Data Collector and MDW - Custom collection sets
- SQL Server 2008 : Physical server design - Server consolidation and virtualization
- Windows Server 2008 Server Core : Determining File and Directory Status with the ChkDsk Utility, Performing Boot Time Disk Checks with the ChkNTFS Utility
- Windows Server 2008 Server Core : Changing File and Directory Attributes with the Attrib Utility
- SQL Server 2008 R2 : Creating and Managing Databases - Creating Databases
 
 
Most view of day
- Windows Server 2008 Server Core : Compressing Data with the Compact Utility
- Manage the Active Directory Domain Services Schema : Remove Attributes from the Index
- Add an InfoPath Form Web Part to a SharePoint Web Part Page
- Microsoft Systems Management Server 2003 : Defining Parent-Child Relationships (part 2) - Installing the Secondary Site Locally from the SMS CD
- Windows Server 2003 : Analyzing Traffic Using Network Monitor (part 1)
- BizTalk 2009 : Host Integration Server 2009 - Planning Your Host Integration Server Topology
- Using Windows Live Programs (part 2) - Using Windows Live Mail
Top 10
- Windows Server 2012 : Enhanced security and compliance (part 2) - BitLocker enhancements, DNSSEC
- Windows Server 2012 : Enhanced security and compliance (part 1) - Dynamic Access Control
- Windows Server 2012 : Full Windows experience (part 2) - Configuring User Profile Disks
- Windows Server 2012 : Full Windows experience (part 1) - RemoteFX enhancements,Configuring RemoteFX, Enhanced USB redirection
- Windows Server 2012 : Support for open standards
- Microsoft SharePoint 2013 : Working with Visio Services - Customizing Visio Services solutions
- Microsoft SharePoint 2013 : Working with Visio Services - Designing dashboards - Data linking (part 4) - Adding data graphics , Web part connections
- Microsoft SharePoint 2013 : Working with Visio Services - Designing dashboards - Data linking (part 3) - Mapping external data to shapes
- Microsoft SharePoint 2013 : Working with Visio Services - Designing dashboards - Data linking (part 2) - Refreshing external data
- Microsoft SharePoint 2013 : Working with Visio Services - Designing dashboards - Data linking (part 1) - Obtaining external data
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro