Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Reversing the "expand" command in XP?  (Read 10203 times)

0 Members and 1 Guest are viewing this topic.

MikeO89

    Topic Starter


    Starter

    • Experience: Guru
    • OS: Windows 7
    Reversing the "expand" command in XP?
    « on: August 10, 2008, 10:44:59 AM »
    Using the "expand" command, I know how to expand a file in XP, like changing a file with extension ".xm_" to ".xml". Can this be reversed, like changing a file with extension ".xml" back to ".xm_"?

    This would be useful to me to be able to take for example a file with extension ".xm_", expand it (to ".xml"), edit it, and then put it back into the package as the original ".xm_".

    Can this be done?
    I7 3770K @ 4.4 gig (Noctua NH-D14 Heatsink), ASRock Z77 Extreme6, 16 (2x8) Gigs Corsair DDR3 1600, EVGA GTX 680 Signature 2, Acer P236H 23" (1920x1080), X-Fi Xtreme Gamer Pro, 4 DVD Burners, 2 WD 640 gig HDDs, WD 750 gig HDD (eSata), Hauppage HD-PVR, Logitech Z-5500 5.1 Speaker System, Corsair TX750w PSU, HSPC Top Deck Tech Station, Windows 7 Pro x64

    abubucker0



      Beginner

      Re: Reversing the "expand" command in XP?
      « Reply #1 on: August 11, 2008, 02:25:13 PM »
      well if you want to change the extensions of the file then do this.....
      control panel->->folder options->->view->->unmark the hide extensions from known file types........

      MikeO89

        Topic Starter


        Starter

        • Experience: Guru
        • OS: Windows 7
        Re: Reversing the "expand" command in XP?
        « Reply #2 on: August 11, 2008, 02:56:27 PM »
        No, it's not as simple as that. Changing the extension from ".xml" to ".xm_" involves compressing it. Simply changing the extension isn't going to do that.
        I7 3770K @ 4.4 gig (Noctua NH-D14 Heatsink), ASRock Z77 Extreme6, 16 (2x8) Gigs Corsair DDR3 1600, EVGA GTX 680 Signature 2, Acer P236H 23" (1920x1080), X-Fi Xtreme Gamer Pro, 4 DVD Burners, 2 WD 640 gig HDDs, WD 750 gig HDD (eSata), Hauppage HD-PVR, Logitech Z-5500 5.1 Speaker System, Corsair TX750w PSU, HSPC Top Deck Tech Station, Windows 7 Pro x64

        Dias de verano

        • Guest
        Re: Reversing the "expand" command in XP?
        « Reply #3 on: August 11, 2008, 03:43:16 PM »
        Expand.exe expands compressed files into their normal state and size. To do the reverse, you use a program called, not surprisingly, compress.exe. It only works on NTFS volumes.

        If it is not already on your system, you can get it as part of the Windows Server 2003 Resource Kit, available free from Microsoft

        http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en


        MikeO89

          Topic Starter


          Starter

          • Experience: Guru
          • OS: Windows 7
          Re: Reversing the "expand" command in XP?
          « Reply #4 on: August 11, 2008, 06:43:11 PM »
          Thank you so much, that worked perfectly.

          I had got some info on another forum to use another program in XP called "makecab.exe". It works similar to "Compress.exe" using the command prompt. Problem with "Makecab" was that it compressed the file to about 1/5th the size of what "Compress.exe" does. I guess that's not necessarily a problem on it's own but it was for what I wanted to use it for.

          An example of what I'm referring to. I could take a ".xm_" file in the Nvidia drivers folder, using the expand command in XP expand it to ".xml". Now if I then used "makecab" to repack it, the resulting ".xm_" file was 1/5th  the size of the original ".xm_". Doing that exact same thing using "Compress", the resulting ".xm_" was the same size as the original.

          What I'm using this for is that the Nvidia drivers install a gazillion profiles that I don't want to see or have to scroll through to get to the ones I want. Nvidia doesn't provide a way to get rid of the profiles it puts there in the Control Panel except to edit the "Nvapps.xml" file (where all the profiles are stored). I usually installed the drivers, then go into the "system32 folder" to find the "nvapps.xml" file to edit out the profiles I didn't want to see in the Nvidia Control Panel. I figured I would try to do this before I installed the drivers instead of after. The only way to do that was to take the "nvapps.xm_" file out of the Nvidia drivers folder (all the files in there are compressed to .xx_), expanding it to "nvapps.xml", editing it, then repacking it back to "nvapps.xm_" and putting it back into the drivers folder to install from there. (whew, that was a mouthful).

          Problem was that trying this with makecab didn't work. Whatever method Nvidia uses to extract those driver files during the install, that one file (that was repacked differently than how it was originally packed) caused the installed file to be unreadable and the wrong size. It's like during the install process it got confused in unpacking that one file.

          Doing this same thing using "compress" did the trick. It installs fine, is readable and the right size.
          I7 3770K @ 4.4 gig (Noctua NH-D14 Heatsink), ASRock Z77 Extreme6, 16 (2x8) Gigs Corsair DDR3 1600, EVGA GTX 680 Signature 2, Acer P236H 23" (1920x1080), X-Fi Xtreme Gamer Pro, 4 DVD Burners, 2 WD 640 gig HDDs, WD 750 gig HDD (eSata), Hauppage HD-PVR, Logitech Z-5500 5.1 Speaker System, Corsair TX750w PSU, HSPC Top Deck Tech Station, Windows 7 Pro x64

          abubucker0



            Beginner

            Re: Reversing the "expand" command in XP?
            « Reply #5 on: August 12, 2008, 09:58:05 AM »
            well mike sorry for the wrong post ............
            didn't know abt..........