Home > Windows Server Tips > Windows Server Monitoring and Management > Exploring the Windows Server 2003 Resource Kit: Compress.exe and Expand.exe
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WINDOWS SERVER MONITORING AND MANAGEMENT

Exploring the Windows Server 2003 Resource Kit: Compress.exe and Expand.exe


Tim Fenner, Contributor
10.31.2007
Rating: --- (out of 5)


Expert advice on Windows-based systems and hardware
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


This segment of my review of the tools in the Microsoft Windows Server 2003 Resource Kit dives into the Compress.exe and Expand.exe utilities.

If you need to make a compressed copy of a file via a script or command line, then these utilities may help.

Per Microsoft:

  • The compress utility is a command-line tool that allows you to create compressed copies of files.
  • The expand utility is a command-line tool that allows you to expand compressed files created by the compress utility.

The copy portion is the key to this compress utility. Most simple compression tools will allow you to compress the original file. Compress actually leaves the original target uncompressed, and instead makes a copy of that original and compresses it. It's important to note that this utility does not compress many files into a single file, such as a CAB file. If you choose to compress all the files in a directory (using a wildcard), it creates a single compressed file for each file in the source directory.

After compressing these files, you then use the Expand.exe utility to uncompress the data. You can also use Expand.exe to extract files from a cabinet (.cab).

Requirements:

  • Windows 2000, Windows XP Professional, or Windows Server 2003 operating systems
  • NTFS formatted volume
  • Proper permissions on directory and files you wish to target

Installation:

  • Install the Resource Kit

General use:
Compress Source Destination

Expand Source Destination

Issues:

Microsoft's help file oddly states, "Do not use Compress.exe (compress) to compress files or folders on the NTFS file system formatted files or folders. To compress or decompress NTFS-...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Windows Server Monitoring and Administration
Perfmon made easy with PAL utility
DirectAccess means 'always on' in Windows Server 2008 R2
Top five Server Core management tips for Windows 2008
Top free tools for Windows server administration
Windows Server 2008 Learning Guide
A quick guide to Server Manager for Windows Server 2008
Moving dynamic disks to a new Windows server
A first look at Storage Explorer for Windows Server 2008
Tips for Windows domain controller optimization
Take control of server clusters with Microsoft's ClusDiag tool

Microsoft Windows Server 2003 Administration
How to install Windows Server 2003 patches when offline
Validating Windows server clusters with ClusPrep
Exploring the Windows Server 2003 Resource Kit: Clusfileport.dll
Exploring the Windows Server 2003 Resource Kit: Cmdhere.inf and CMGetCer.inf
Windows server security management: Security expert roundup
Windows server management with Remote Desktop
Avoid DC restoration problems with authoritative restore
Exploring the Windows Server 2003 Resource Kit: Confdisk.exe
Exploring the Windows Server 2003 Resource Kit: Clusterrecovery.exe
How to use Microsoft's IIS Diagnostics Toolkit
Microsoft Windows Server 2003 Administration Research

Windows Data Storage Administration Tools
eZines and eBooks for Windows server professionals
Quick tips for troubleshooting NTFS permissions
Using NTFS on a non-Windows OS with NTFS-3G
How to keep IIS logs from filling up your server hard drives
Server Message Block 2.0: A new protocol for the millennium
Top Windows storage improvements for cutting costs in '09
Breaking down the Windows Server Backup tool for Windows 2008
A first look at Storage Explorer for Windows Server 2008
Windows scripting secrets for disk quota management
Top 10 Windows storage management tips of 2007

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


formatted files or folders, use the Compact command-line tool or set the Compressed attribute of the file or folder in Windows Explorer." However, I don't quite understand this warning. True, the compress utility is old, but it seems to work just fine on an NTFS formatted volume, where the files and folders reside. I do know that you cannot use the built-in NTFS file properties dialog box to uncompress a file that has been compressed using this utility. Perhaps Microsoft wants you to make sure to use the compact tool instead so you can use the NTFS file properties windows to uncompress the file.

Windows XP appears to have a bug in that it cannot pass the source path. In other words, if you want to compress a file in the c:\folder1 directory to another directory called folder2, you cannot run the following command: compress c:\folder1\test.txt c:\folder2. If you do, you will receive an ERROR: Unable to open C:\folder1\test.txt message. The only way around this is to navigate to the directory that contains the source file, and then run the compress command. So, using the example above: c:\folder1> compress test.txt c:\folder2.

The Microsoft Windows Server 2003 Resource Kit tools are a set of tools to help administrators streamline management tasks, such as troubleshooting operating system issues, managing Active Directory®, configuring networking and security features, and automating application deployment.

About the author: Tim Fenner (MCSE, MCSA: Messaging, Network+ and A+) is a senior systems administrator who oversees a Microsoft Windows, Exchange and Office environment. He is also an independent consultant who specializes in the design, implementation and management of Windows networks.

Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts