WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> Can we use 7-Zip to compress?
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1346360275

Message started by jbarrow.viracoribt on Aug 30th, 2012 at 10:57pm

Title: Can we use 7-Zip to compress?
Post by jbarrow.viracoribt on Aug 30th, 2012 at 10:57pm
I'm getting a much better compression ratio zipping up the same files using 7-Zip over the built-in engine you use. Is there any way to call 7-Zip to compress my files?


8-30-2012_3-56-59_PM.png (3 KB | )

Title: Re: Can we use 7-Zip to compress?
Post by Gert on Aug 31st, 2012 at 8:37am
Yes you can.
You should download the commandline 7zip (called 7za.exe, it is currently the 6th downloadlink on http://www.7-zip.org/download.html ). Then you create a task using "run a bat file" and let it run the following bat file:
[code]SET SEVEN=C:\Bin\7za.exe
SET TARGETDIR=C:\Compressed

SET ZIPNAME=%TARGETDIR%\%WD_FILE_B%.7z

"%SEVEN%" a "%ZIPNAME%" "%WD_FILE%"
[/code]

Obviously you should change the paths according to where 7za.exe is and where you want the archive to be created.

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.