Vic's Registry RoundUp and DOS Den
~~Vic
Ferri, Win Tips and Tricks
Fastest Way To
Extract Cab Files
This is my
most popular bat file - the fastest, easiest way to extract
cab files in Windows 95 or 98. I've been using this method to search
and extract cab files for years and I have yet to see any
easier, faster or more efficient way to do this
without the need for any outside utility or program.
Why
would you want to extract cab files? Well, when one of your
Windows files is corrupt or missing, this is where they are located on
your Windows CD.
I will
try to make this easy to understand for even the novice, by giving
a step by step guide.
In
this demo, I am assuming that your cab files are located on
your CD in D:\Win98se.
Make
sure to substitute with the path of your own Windows cab files or
Windows CD, if different from in the demo.
Ok, here's what to do, step by step.
1.
Open up a new Notepad document or any other text editor and
copy and paste these commands into it. Once pasted, remember to
subsitute the path
@echo
off
md c:\windows\desktop\WinFiles
if "%1"=="" goto error
CLS
c:
cd c:\windows\desktop\WinFiles
for %%i in (D:\Win98se\*.CAB) do extract %%i %1
ECHO.
IF EXIST %1 ECHO %1 successfully extracted.
IF NOT EXIST %1 ECHO %1 not found
goto end
:error
echo.
echo Syntax: CabX file-to-extract
echo Example: CabX Control.exe
echo.
:end
Save
the file as CabX.bat in your C:\Windows directory. (make sure you use
the .bat extension and not the .txt extension that you would normally
use in a text editor such as Notepad)
2. Now create a shortcut to cabx.bat by right click
and dragging it from your Windows folder to your Desktop and choosing
"New Shortcut Here" from the context menu that pops up when
you release the mouse button.
3. Right click your new desktop shortcut and go to
Properties. Click the Program tab. Enter a space and a ? mark at
the end of the command line, ie: C:\Windows\cabx.bat ?
4.
Click Apply and then click Change Icon to choose a more friendly icon.
Finally, rename the shortcut to CabExtract or whatever you prefer.
You now have a desktop shortcut that will almost instantly extract
any cab file from your Windows CD by just entering the name. The
file will be extracted to a a folder named WinFiles, on your desktop.
Test it out.
Click
the shortcut and enter explorer.exe and click ok. Within seconds,
you should have explorer.exe extracted to the newly created
WinFiles folder.
Another
benefit of this method is that you can see where any cab file is
located. You don't have to go looking for it. Therefore it
searches, finds and extracts all in one shot.
TIP:
If the scrolling is too fast and you need to know the location of a
particular cab file, extract the file and then enter the name
again to extract it a second time. This will cause DOS to stop at the
location of the cab file to ask you if you want to overwrite the one you
already extracted, and thus give you a clear view of the location of the
cab file. Once you note the location, click No.
You
can also enter wildcards and partial names if you're not sure of the
name of a file you need. For example, say the file you need
is comctld32.dll but you're not sure of the spelling. Just enter
something like com*.dll and it will extract all dll files that
begin with com.
Or if you don't know the extension either, simply enter com*.* and ALL
files that begin with com regardless of extension, will be extracted.
You can also extract multiple files.
Say you want to back up all your dll files. Just enter *.dll and every
single dll file will be extracted.
Say you want to backup ALL your Windows cab files. Just enter *.*
and every single file from every single cab file will be extracted.
You can also run the actual bat file (not the shortcut) in native DOS
or at the Runbox by entering the name of the bat file followed by
the name of the file you want to extract.
For
example:
cabx kernl32.dll would extract kernl32.dll.
Note
that you don't have to enter the extension of the bat file. cabx is all
you have to enter, not cabx.bat.
Note:
If you are a newbie when it comes to DOS and would like an
easy to understand book that will teach you DOS in plain English, there
are two books in the popular Dummy series I would recommend - Dos
For Dummies and Dos For Dummies Quick Reference. Both
are excellent and very thorough.
|