fdv Posted February 5, 2008 Posted February 5, 2008 Hey TP and TC, I found a little file to makecab everything in a folder in some other subforum but it didn't work, and was an abandoned topic. Since HFSLIP has this functionality, would either of you fellows mind terribly posting a file to just do one thing -- makecab every single file in a folder? (Except the utility itself of course, and stopping when all files are done, instead of continuing forever to makecab the files already done once).It would've helped me during my NT4 odyssey, but truth is I was working so slowly anyway I didn't even think of it
zedox Posted February 6, 2008 Posted February 6, 2008 I think the program you might be after is called CabPack.
fdv Posted February 6, 2008 Author Posted February 6, 2008 Cabpack makes CAB files.I need to run makecab on every file in a directory to make the files go fromFILE1.EXEFILE2.EXEto FILE1.EX_FILE2.EX_
ctpooon Posted February 6, 2008 Posted February 6, 2008 hi fdv, first, download makecab from the following linkhttp://support.microsoft.com/kb/310618then1. create a empty file2. copy the code under into the file3. change c:\makecab to the directory that you would like to make all files into cab4. save the as makecab.cmd (or anything end with .cmd)5. put the cmd file next to the bin/MAKECAB.exe you just downloaded from microsoft.6. double clicking the cmd should make all the files in directory c:\makecab into a xxxx.xx_ rem @echo offfor %%a in (c:\makecab\*.*) do MAKECAB %%apause
Kelsenellenelvian Posted February 7, 2008 Posted February 7, 2008 Xperos eXPander or jcarles Compression bin BOTH do what you are looking for.
ctpooon Posted February 7, 2008 Posted February 7, 2008 (edited) Nope. Test first.Anyone?tested again. working on both of my machines.have a look in your d:\1-windows-NT4 to see if there is any *.*_ Edited February 7, 2008 by ctpooon
fdv Posted February 7, 2008 Author Posted February 7, 2008 ctpoon, thanks, but the program only loops forever, and does the same file over and over, and never actually produces any output. No idea why.Xperos eXPander - Google search, MSFN search produce no resultsjcarles Compression bin - relies on framework (but I gotta install framework anyway eventually I suppose).ctpoon, BTW, does your name mean you are fond of ladies in Connecticut?
tommyp Posted February 7, 2008 Posted February 7, 2008 For argument sake, lets say the files you want to compress is located in a folder called INPUT.Create a folder called OUTPUT and the the compressed files will end up here. Open a dosbox in the root of the INPUT and OUTPUT. Put this code in your dosbox. FOR /F %I IN ('DIR /B INPUT') DO makecab HF\%I /L OUTPUTIf you prefer, you can change the %I to %%I both times if you want to use it in a batch (cmd) file. You'll need to place the cmd file in the same directory as the input and output folders.
Yzöwl Posted February 12, 2008 Posted February 12, 2008 I don't know if this is what you want but here goes:The attached archived 'compiled' batch file (you need to extract it!) takes a directory as a parameter. You do this by dropping your directory onto it.What happens is that it will makecab all files* in the top level of that directory and upon success delete the uncompressed version.This action will be performed without showing a console window, so be careful that the process is finished prior to messing with the directory. Also due to this hiding of the console window your anti-malware scanners may warn you about this file. It is of course up to you whether you continue or not.* - All files will exclude individual files which are already cabbed or cab archives.Please note that this file was intended for use on Windows XP and may fail in any other OS.I hope it helps!CabAll.7z
fdv Posted February 12, 2008 Author Posted February 12, 2008 (edited) Thanks, Wise; this is awesome... just perfect.You can advertise it as working in 2000 too BTW.EDIT: aw, crud. It works, but Windows NT4 cannot extract the files. So the problem is with NT4's EXPAND which probably can be replaced with 2000's. Oddly, when files are compressed in 2000 with the 2000 native MAKECAB, NT4 seems to do fine. Edited February 13, 2008 by fdv
Yzöwl Posted February 13, 2008 Posted February 13, 2008 My guess is that it's because my executable is using LZX compression which I think wasn't an option in the earlier incarnation of makecab and therefore also in the extraction utility.In the attachment this time there are two different versions:MSZIP - file ver 1.0.0.1 - This should allow the file to be extracted in the earlier OSLZX - file ver 1.0.0.2 - This is as the previous version I posted, with a small difference.The difference is that I have included the XP SP2 version of Makecab as part of both of these executables. This gives you the opportunity to run them without worrying about having makecab installed in %PATH% and to guarantee functionality.Neither have as yet been tested for stupid mistakes!CabAlls.7z
Kiki Burgh Posted February 18, 2008 Posted February 18, 2008 Xperos eXPander - Google search, MSFN search produce no resulthi fdv! here's the new download link for XPero's utilities, specifically eXPander
fdv Posted April 8, 2008 Author Posted April 8, 2008 Add Compress as a context menu option to .DLL and .EXE filesA bump because I figured out a REALLY simple way to work with files.Although this won't makecab everything in a folder, it will add Compress as a context menu option to dll and exe files. You can select several of both kinds and it will makecab them all: select as many DLL and EXE files as you want and left click and you will see "Compress" as an option. Select it, and every one of your selected files will be compressed.[Version]signature="$Windows NT$"[DefaultInstall]AddReg = addreg[addreg]HKCR,"exefile\Shell\Compress\command",,,"%11%\makecab.exe ""%1"""HKCR,"dllfile\Shell\Compress\command",,,"%11%\makecab.exe ""%1"""HKCR,".dl_\Shell\expand\command",,,"%11%\expand.exe -r ""%1"""HKCR,".in_\Shell\expand\command",,,"%11%\expand.exe -r ""%1"""HKCR,".ex_\Shell\expand\command",,,"%11%\expand.exe -r ""%1"""HKCR,".sy_\Shell\expand\command",,,"%11%\expand.exe -r ""%1"""
os2fan2 Posted April 10, 2008 Posted April 10, 2008 You could use 'compress.exe' from the resource kit.compress -r * outputdir
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now