Windows 10: PowerShell script to compress folder contents to cabinet file (.cab)

Discus and support PowerShell script to compress folder contents to cabinet file (.cab) in Windows 10 Software and Apps to solve the problem; The script takes the contents of a folder (including all its subfolders) and creates a cabinet file (.cab), using the Windows native makecab.exe... Discussion in 'Windows 10 Software and Apps' started by ddelo, Sep 1, 2018.

  1. ddelo Win User

    PowerShell script to compress folder contents to cabinet file (.cab)


    The script takes the contents of a folder (including all its subfolders) and creates a cabinet file (.cab), using the Windows native makecab.exe command.

    Get it here: Create-CAB.zip

    The script can be run, from either within PowerShell or from a shortcut (to find out how to run it from a shortcut, see this excellent tutorial by @Kari).

    When the script is run, it will ask for the user input:
    1. “Full path of the folder to compress to cabinet file
    When prompted provide the complete path of the folder which contains the files you want to compress to cabinet file.
    e.g. If you want to compress the contents of a folder named “MyStuff” in your Documents folder you enter C:\Users\<YourUserName>\Documents\MyStuff (or for short: $env:HOMEPATH\Documents\MyStuff).
    If you want to compress the contents of a folder named “Intel_MCU” in your Downloads folder, you enter the full path C:\Users\<YourUserName>\Downloads\Intel_MCU (or for short: $env:HOMEPATH\Downloads\Intel_MCU), (#1 in screenshot below).

    2. “Cabinet filename (without the .cab extension)
    When prompted provide the name of the cabinet file you want to create, without the “.cab” extension. The extension will be automatically added by the script, (#2 in screenshot below).

    After getting your input, depending of the size on the files you want to compress the script will run and will create the requested cabinet (.cab) file within the folder the script is run from, i.e. if you run the script from your desktop, the cabinet file will be created in your desktop, (#3 in screenshot below).

    It’s worth mentioning that if the filename you provide, already exists in the folder you run the script from, the existing file will not be deleted or overwritten, but for backup reasons, it will be renamed with a suffix with the file’s date/time, (#4 in screenshot below).



    PowerShell script to compress folder contents to cabinet file (.cab) [​IMG]


    That’s it.

    Please feel free to alter the script to suit your needs.

    :)
     
    ddelo, Sep 1, 2018
    #1

  2. how to manually install .cab file in windows 10 64 bit?

    Hello,

    Thank you for posting your query in Microsoft Community.

    A cabinet (.cab) file is a library of compressed files stored as a single file. Cabinet files are used to organize installation files that are copied to the user's system. A large compressed file can be spread over several .cab files.

    Please provide more information to help you better:


    • What is the Model of the Nokia phone?

    • What happens when you connect the phone to the computer? Do you receive nay error message?

    • What is the issue that you are facing on the phone?

    • When you say "I need to install a driver on my windows 10 for my Nokia mobile", how did you come to know about this driver? What driver are you referring to? Which driver did you download from the Microsoft update catalog?

    Reply with the necessary information to help you better.
     
    Anju Thekkethil, Sep 1, 2018
    #2
  3. BulldogXX Win User
    I would like to ask how to install a cab file in windows 10. Please I need help.

    A cabinet (.cab) file is a library of compressed files stored in a single file. Cabinet files are used to organize installation files but they can't be separately installed. They're just a collection of files.
     
    BulldogXX, Sep 1, 2018
    #3
  4. petrib Win User

    PowerShell script to compress folder contents to cabinet file (.cab)

    Does the Nokia 6680 support .cab files?

    The .cab file format is a Microsoft archive/package (cabinet) file format (something like .zip).

    As far as I know, there are no apps for the 6680 that can handle .cab files.

    On the other hand, how likely is it that a .cab file has content usable on a Nokia phone? That is, a .cab file on a PC would typically contain Windows software/application & that wouldn't work at all on the phone.
     
    petrib, Sep 1, 2018
    #4
Thema:

PowerShell script to compress folder contents to cabinet file (.cab)

Loading...
  1. PowerShell script to compress folder contents to cabinet file (.cab) - Similar Threads - PowerShell script compress

  2. Compress new folder content in compressed folder

    in Windows 10 Network and Sharing
    Compress new folder content in compressed folder: I have several folders on my filesystem that I've set to compress everything inside including subfolders. When I set the folder to compress, everything was compressed as expected.However, new content I add files and folders are not compressed, it seems. At least they are not...
  3. Compress new folder content in compressed folder

    in Windows 10 Gaming
    Compress new folder content in compressed folder: I have several folders on my filesystem that I've set to compress everything inside including subfolders. When I set the folder to compress, everything was compressed as expected.However, new content I add files and folders are not compressed, it seems. At least they are not...
  4. Compress new folder content in compressed folder

    in Windows 10 Software and Apps
    Compress new folder content in compressed folder: I have several folders on my filesystem that I've set to compress everything inside including subfolders. When I set the folder to compress, everything was compressed as expected.However, new content I add files and folders are not compressed, it seems. At least they are not...
  5. Filing Cabinet Icons

    in Windows 10 Gaming
    Filing Cabinet Icons: Hello -All of my photos suddenly have a small filing cabinet icon on the lower left. I can't open them to send them. Can anyone please tell me how to get rid of these icons so I can access my photos again? I can see the thumbnails of the photos, it's just that it won't allow...
  6. Filing Cabinet Icons

    in Windows 10 Software and Apps
    Filing Cabinet Icons: Hello -All of my photos suddenly have a small filing cabinet icon on the lower left. I can't open them to send them. Can anyone please tell me how to get rid of these icons so I can access my photos again? I can see the thumbnails of the photos, it's just that it won't allow...
  7. PowerShell script

    in Windows 10 Support
    PowerShell script: The code below tests a series of IPs in a txt file.The result is as follows and is written in a txt file. 19.191.12.161 - online 19.191.12.162 - offline 19.191.12.163 - offline 19.191.12.164 - offline 19.191.12.165 - offline also see the scrennshot Code: $Output= @()$GetIP =...
  8. ,cab file

    in Windows 10 Drivers and Hardware
    ,cab file: need to install a .cab file for an older printer https://answers.microsoft.com/en-us/windows/forum/all/cab-file/5e3b9f70-41a5-4288-9bf1-298ccd4b0e80
  9. powershell scripts

    in AntiVirus, Firewalls and System Security
    powershell scripts: Hi, I have azure. Someone is somehow installing powershell scripts onto my computer that allows them to host my PC through P2P and UDP connections, well I think so anyway. I have only just found powershell script entry changes in my registry by accident. These criminals...
  10. powershell script

    in Windows 10 Customization
    powershell script: looking for a script to monitor for a folder, if there is a file in that folder send it as an email, once the email is sent out, confirm and then move the files to an archive folder. monitor c:\test\*.pdf No files, do not send email. Yes Files, send an email to someone at...

Users found this page by searching for:

  1. cab powershell windows update same folder

    ,
  2. powershell to compress directory

    ,
  3. powershell make cab file

    ,
  4. POWERSHELL MAKECAB,
  5. compress to cab,
  6. powershell compress folder,
  7. is .cab and .zip same,
  8. compress directory powershell cab file,
  9. windows batch file use explorer to compress files,
  10. script to compress the all files in folder,
  11. zip to cab,
  12. powershell compress all csvs in folder,
  13. batch windows 2016 archive contents of folder,
  14. compress windows cab files,
  15. powershell script to compress files