reinstalling windows
Results 1 to 4 of 4

Thread: reinstalling windows

  1. #1
    Join Date
    Sep 2002
    Posts
    170

    reinstalling windows

    hi. i have a REALLY slow Windows 95 (win). I decided to do a clean sweem - use a blank hard drive and boot up the computer from that hard drive. i have all the .cab files, and when I clicked on it, it asked me which program to use to open those kind of files. i selected "extract" - that's the program you use to extract the files. so then I clicked on the first .cab file. it opened the msdos prompt and displayed all the files then it said how many total files there were. But, it didn't extract them. what one command (if possible) can I use to extract ALL the .cab files without it prompting me to overwrite the files? i would like one command to extract them all, if possible. Thanks a bunch!
    Originally posted by (unknown)
    Micro$oft works - I finally understand the definition of an oxymoron

  2. #2
    Join Date
    Feb 2000
    Location
    26.03°N 80.14°W
    Posts
    9,410
    Assumptions:
    1. Your working CD-ROM drive that contains your Microsoft Windows 95 CD is drive:

      D:
    2. You want to extract the contents of all the D:\WIN95\*.CAB files to directory:

      c:\w95cabs\xtracted
    3. If there are any duplicate filenames within the various .CAB files, you want them overwritten without being prompted.
    4. The Windows 95 EXTRACT.EXE program is available somewhere in your PATH.
    The three DOS commands needed would be:
    Code:
    md c:\w95cabs
    md c:\w95cabs\xtracted
    for %x in (d:\win95\*.cab) do extract /y /l c:\w95cabs\xtracted %x *.*
    Note:
    • Those first two DOS commands will not be needed if directory c:\w95cabs\xtracted already exists.
    Vernon Frazee, Microsoft MVP (Windows - Shell/User)

    Defenses Up!
    Tip: When prompted for a password, give an incorrect one first. A phishing site will accept it; a legitimate one won't.


    Inside Spyware: A Guide to Finding, Removing and Preventing Online Pests


    If you don't keep up with security fixes, your computer|network won't be yours for long.

  3. #3
    Join Date
    Sep 2002
    Posts
    170

    thanks

    thank you SOOOOOOO much! it worked! but, I would like to know what this means:
    ----
    for %x in (d:\win95\*.cab) do extract /y /l c:\w95cabs\xtracted %x *.*
    ----
    thanks a bunch!
    Originally posted by (unknown)
    Micro$oft works - I finally understand the definition of an oxymoron

  4. #4
    Join Date
    Feb 2000
    Location
    26.03°N 80.14°W
    Posts
    9,410
    Let's start with just a simple single .CAB file command:
    Code:
    extract /y /l c:\w95cabs\xtracted d:\win95\win95_10.cab *.*
    • The extract means we want to use the extract.exe program
    • The /y means we want to automatically answer yes to "Overwrite?"
    • The /l c:\w95cabs\xtracted tells extract this is the destination directory
    • The d:\win95\win95_10.cab is the .CAB file we want to extract from
    • And the *.* means extract all files from win95_10.cab
    Now, there are 30 .CAB files in the \WIN95 directory on the Windows 95 CD:
    MINI.CAB PRECOPY1.CAB PRECOPY2.CAB win95_02.cab win95_03.cab win95_04.cab win95_05.cab win95_06.cab win95_07.cab win95_08.cab win95_09.cab win95_10.cab win95_11.cab win95_12.cab win95_13.cab win95_14.cab win95_15.cab win95_16.cab win95_17.cab win95_18.cab win95_19.cab win95_20.cab win95_21.cab win95_22.cab win95_23.cab win95_24.cab win95_25.cab win95_26.cab win95_27.cab win95_28.cab
    We could type all 30 commands, such as:
    Code:
    extract /y /l c:\w95cabs\xtracted d:\win95\MINI.CAB     *.*
    extract /y /l c:\w95cabs\xtracted d:\win95\PRECOPY1.CAB *.*
    extract /y /l c:\w95cabs\xtracted d:\win95\PRECOPY2.CAB *.*
    extract /y /l c:\w95cabs\xtracted d:\win95\win95_02.cab *.*
    extract /y /l c:\w95cabs\xtracted d:\win95\win95_03.cab *.*
    extract /y /l c:\w95cabs\xtracted d:\win95\win95_04.cab *.*
    ...
    extract /y /l c:\w95cabs\xtracted d:\win95\win95_28.cab *.*
    Or we could get DOS to do it with the for-in-do command.

    To give you an example of what for-in-do can do, try the following three commands at the DOS prompt:
    Code:
    for %x in (red green blue) do echo %x
    for %x in (autoexec.bat config.sys) do dir c:\%x
    for %x in (c:\*.*) do dir %x
    As you can see, DOS uses whatever you put between the parenthesis as the parameter for the DOS command listed after the DO. For instance, the first example above echo's (displays) the words red, green and blue, one below the next. The next example displays a directory listing of the c:\autoexec.bat then the c:\config.sys file. And the last one does a DIRectory listing of each and every file you have in the root directory of drive C:.

    So, instead of typing 30 DOS commands to extract all files from the 30 Windows .CAB files, we'll let DOS's for-in-do do all the work ... with the following single command:
    Code:
    for %x in (d:\win95\*.cab) do extract /y /l c:\w95cabs\xtracted %x *.*
    Make better sense now?

    More info about what for-in-do can do can be found on this page: http://www.vfrazee.com/ms-dos/6.22/help/for.htm
    Vernon Frazee, Microsoft MVP (Windows - Shell/User)

    Defenses Up!
    Tip: When prompted for a password, give an incorrect one first. A phishing site will accept it; a legitimate one won't.


    Inside Spyware: A Guide to Finding, Removing and Preventing Online Pests


    If you don't keep up with security fixes, your computer|network won't be yours for long.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •