Jump to content

Recommended Posts

Posted

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 OFF

SETLOCAL ENABLEEXTENSIONS

SET 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 :)


Posted (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 OFF
SETLOCAL ENABLEEXTENSIONS
SET 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
ECHO Target is %Target%
ECHO Source is %Source%
ECHO File to be compressed is %%J
PAUSE
)

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? :w00t:

DO NOT use PATHs with spaces in folder name.

jaclaz

Edited by jaclaz

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...