Execute Command with 7zip

Post Reply
braam
Newbie
Posts: 7
Joined: Wed Aug 31, 2011 11:28 am

Execute Command with 7zip

Post by braam »

Hi



I have a application that gives me a 7zip password protected file. I have to extract it, edit some files inside and then compress again exactly like it was.

Everything is working fine, except when compressing the files again, I cant compress them to the root folder. let me explain.



Say I have a folder named "test", which contains loads of files, which I now want to compress. the compressed file must be named "test" as well, and all the files must be directly under that zip folder.



So here is what I do:

I use the Execute command tool

settings like this:

command or path:c:7zip7za.exe

Arguments:a %2 %1 -pp2p100

Output:file at path

Copy input job:yes

Output extension:.7z



Now this works 100%, except it creates another subfolder under the zip folder.

example: test.7z now contains a folder test, with the files under that...I dont want the extra folder....now when I try to do this at my arguments:

Arguments:a %2 %1*.* -pp2p100

(I just add the *.* as this works when I work directly in the command line interface), then I get no output at all.



Im sure I am missing something really stupid, but just cant seem to find my problem.



Any help will be great



Thanks!!

Braam






braam
Newbie
Posts: 7
Joined: Wed Aug 31, 2011 11:28 am

Execute Command with 7zip

Post by braam »

Managed to get it to work



In the end I I just used a switch variable instead of the %2 (strange as it is supposed to give exactly the same result), this works 100%, so my argument line now looks like this:



a %2 [Job.Path]*.* -pp2p100
Post Reply