Nancy Street resxtract
HomeInfoMusicGalleryPetsGeoHobbiesGeo
Links Removed Home « Computers « resxtract

A command line utility to extract binary resources from xml resource (resx) files and write them to separate correctly named files.
An attempt is made to reconstruct an object according to the Type definition in the xml. Some types (Bitmap, Icon) are constructed from the underlying byte array and written using their formal methods. Some resources (WAV files for example) are encoded as plain byte arrays, so they are written directly to a file.

Note from Greg: I'm not really sure that this code represents the easiest way of extracting the binary resources. I searched through the System.Resources namespace looking for some standard utility classes to help me produce short and elegant code, but I couldn't find any. So I'm stuck with the logic described above to inspect the Types, which I'm not really happy with, as it doesn't seem very general purpose. Any advice on this matter would be most welcome.

Here is the help display from resxtract when no parameters are entered:

DESCRIPTION
Extracts binary objects from xml resource (resx) files.
SYNTAX
resxtract resxfile [ outfolder ]
PARAMETERS
resxfile ....... The resx file to process.
outfolder ...... The optional output folder, default is the current folder.

Downloads

resxtract_proj.zip - (30KB) Zip of the Visual Studio 2005 project and source.
resxtract_exe.zip - (8KB) Zip of the executable.

Back to: Computers & Software Main Page


Visitor Book ♦ Last Updated: 06-Feb-2012 7:15
Copyright © 1999-2012 Orthogonal Programming