From Valve Developer Community
Revision as of 18:57, 11 December 2006 by Nem (talk | contribs) (Defragmentation)

Jump to: navigation, search
Typical GCFScape Window


GCFScape is a small tool that enables you to browse through the GCF files that are utilized by Steam for game content storage. This could be useful for making model mods or extracting in game sounds.


Extracting files from GCF's couldn't be simpler with this utility as it's like the Explorer folder tree format. But if you're still stuck, here's how to extract files:

When you install GCFScape make sure you associate GCF files with GCFScape so they'll open straight away, they'll look like this if they're associated:


Double clicking one of these will open GCFScape. Say, you opened the Counter-Strike Source Shared GCF, the program will open and appear like this:


Clicking the little Plus.PNG button, you can browse the folders clicking on them so they expand and show subfolders like so, then clicking on a folder will show the contents to the right:


Right clicking a file will bring up a context menu from where you can extract from:


Clicking this will bring up a window where you can choose your save location:


Clicking OK will extract the file to your chosen location.

Supported Formats

In addition to GCF files, GCFScape also supports Half-Life BSP, NCF, PAK, WAD, and XZP files.


The following options are available through the options menu from within GCFScape:

Enable verbose logging (enabled by default). Disable this option to reduce log output. This can be useful when you are extracting large amounts of files and only want to be informed of errors.
File Mapping
Enable Windows file mapping (enabled by default). File mapping is an efficient method of random file access. Some operating systems have problems with file mapping (in particular Windows 98) and may produce errors; disable this option in such cases.
Quick File Mapping
Map the entire file to memory (instead of pieces of it as needed). Effectively caches the file in memory. Can speed things up if you have sufficient free memory. Some operating systems have problems with file mapping (in particular Windows 98) and may produce errors; disable this option in such cases.
Volatile Access
Enable volatile file access (enabled by default). By default, Steam loads .gcf files in read/write mode and is liable to change their contents at any time (as updates occur). Should this happen, GCFScape would become unstable and likely crash. Volatile access allows you to open GCF files loaded in Steam at your own risk. It is generally stable and can prove useful for examining which files Steam is updating.
Write Access
Enable write file access (disabled by default). Write access gives GCFScape the ability to modify certain files and is not compatible with volatile access for the instability a combination of the two would cause. This option is required for GCF defragmentation.


In version 1.5.0, GCFScape added the ability to validate GCF files. This process computes a series of hybrid CRC 32 and Adler-32 checksums for each file within a GCF file and compares each checksum to the checksums precalculated and stored within the GCF file. This feature provides a quick alternative to Steam for checking GCF corruption and listing corrupt and incomplete files, but cannot repair corrupted GCF files as Steam can.

To validate all or part of a GCF file using GCFScape, complete the following steps:

  1. Launch GCFScape.
  2. From the File menu, open your GCF file.
  3. Browse to the top level folder you wish to validate (root for the entire GCF file).
  4. Right click on the folder and select Validate.
  5. Repeat steps 2-4 for each GCF file you wish to validate.


In version 1.6.0, the ability to defragment GCF files was added to GCFScape. This feature was added after several tests by Nem indicated that Steam's built in defragmenter did not always completely defragment a game's GCF files. In fact, Steam would often falsely report a fragmentation of 0% when the true fragmentation was as high or higher than 10%, a value extremely detrimental to performance.

GCFScape defines the fragmentation ratio to be the number of used clusters that are out of order divided by the total number of used clusters. The first cluster in a file can never be out of order, so a file that consists of only one cluster (typically < 8192 B) can never be fragmented. At 10% fragmentation, a typical ~785 MB GCF file (roughly 100,000 clusters at 8192 B per cluster) would require, on average, one seek operation for every 80 KB of data read. You can view the fragmentation of any file or folder (root for the entire GCF file) by checking its properties.

To defragment your GCF files using GCFScape, complete the following steps:

  1. Shutdown Steam.
  2. Launch GCFScape.
  3. In the Options menu, enable File Mapping and Write Access, and disable Volatile Access.
  4. From the File menu, open your GCF file.
  5. From the Tools menu, select Defragment.
  6. Repeat steps 4-5 for each GCF file you wish to defragment.
Note:The defragmentation process is quite slow, but can be canceled and resumed at any time.

External links