Multiple files in .cab file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
miskox
Posts: 359
Joined: 28 Jun 2010 03:46

Multiple files in .cab file

#1 Post by miskox » 03 Dec 2014 06:41

Is it possible to add multiple files into .cab file with MAKECAB?

Thanks.
Saso


Squashman
Expert
Posts: 4198
Joined: 23 Dec 2011 13:59

Re: Multiple files in .cab file

#3 Post by Squashman » 03 Dec 2014 07:35

To compress multiple files into a single CAB file, use a directive file containing a list of the files to compress and package.

http://ss64.com/nt/makecab.html

npocmaka_
Posts: 498
Joined: 24 Jun 2013 17:10
Location: Bulgaria
Contact:

Re: Multiple files in .cab file

#4 Post by npocmaka_ » 03 Dec 2014 07:38

Code: Select all

;@echo off

;set "file_list="C:\file1";"c:\file2";"c:\file3""

;break>files
;for %%a in (%file_list%) do (
;   echo %%a
;)>>files

;makecab /f "%~f0"  /f files /v0 >nul

;exit /b 0




.Set DestinationDir=.
.Set DiskDirectory1=.
.Set CabinetNameTemplate=Destination.CAB
.Set Cabinet=on
.Set Compress=on


this will create Destination.CAB file with the files listed in file_list

miskox
Posts: 359
Joined: 28 Jun 2010 03:46

Re: Multiple files in .cab file

#5 Post by miskox » 03 Dec 2014 10:17

Thanks!

Saso

Post Reply