kipbi Posted January 29, 2008 Posted January 29, 2008 Hello,I'm trying to compress 80 individual files to .ex_ .dl_ and .cr_ format.I've tried searching the forum and then found this:(not working for me)@ECHO OFFSETLOCAL ENABLEEXTENSIONSSET SOURCE= <write the name of the source folder here>SET TARGET= <write the name of the target folder here>IF EXIST %SOURCE%\*.* FOR /F %%J IN ('DIR /A-D /OGN /B %SOURCE%\*.*') DO MAKECAB /D CompressionMemory=21 /D CompressionType=LZX /L %TARGET% %SOURCE%\%%J(not working for me)Compressing Drivers dll to dl_ How?Unfortunatly it doesn't work for me. Nothing happens... Does anyone know how to make it work or perhaps there's an other way? (And not one by one lol)It's supposed to be separatly compressed, so that I have 80 separate compressed files with the extension .ex_ .dl_ and .cr_I hope someone can help me
jaclaz Posted January 29, 2008 Posted January 29, 2008 (edited) That's (I mean compressing single files) exactly what the code snippet does.As always when checking batch files, put temporarily some "PAUSE" statements and add some ECHO statements, try this:@ECHO OFFSETLOCAL ENABLEEXTENSIONSSET SOURCE= <write the name of the source folder here>SET TARGET= <write the name of the target folder here>IF EXIST %SOURCE%\*.* FOR /F %%J IN ('DIR /A-D /OGN /B %SOURCE%\*.*') DO (MAKECAB /D CompressionMemory=21 /D CompressionType=LZX /L %TARGET% %SOURCE%\%%JECHO Target is %Target%ECHO Source is %Source%ECHO File to be compressed is %%JPAUSE) You did see these two lines:SET SOURCE= <write the name of the source folder here>SET TARGET= <write the name of the target folder here>and put in them the right values, didn't you? DO NOT use PATHs with spaces in folder name.jaclaz Edited January 29, 2008 by jaclaz
kipbi Posted January 29, 2008 Author Posted January 29, 2008 Yeah! It works like a charm! Thank u very much! P.S. Yes I did see those two lines lol
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now