Notifications
Clear all

[Closed] Create .bat file

the next stop will be decompressing everything after this abracadabra

What do you mean. I tested this and works. If you mean about password that argument is optional. I also plan to add “spliting” option And that will be pain in the a**

Edit: If you convert “abracadabra” to switches then it will look like this “-a -br -ac -ad -ab -ra”

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

a -ac -ai -ep1 -kb -ibck -os -rr3p -s -ds -ed -r -y -m…
for anyone who doesn’t understand we repeat:
a -ac -ai -ep1 -kb -ibck -os -rr3p -s -ds -ed -r -y -m

:):)

Eventually working 7zip compresion method.
Some switches are different from RAR’s (rar have twice as many then 7zip)
NOTE:
compressLevel argument must use this numbers:
0 “No compression” | 1 “Fastest” | 3 “Fast” | 5 “Normal”| 7 “Maximum” | 9 “Ultra”


 fn compressTo7zip folder: _7zipFile: compressLevel: password: _7zipDir:@"c:\Program Files\7-Zip\" = if doesDirectoryExist folder do
 (
 	_7zipFile = if pathConfig.isPathRootedAtBackslash _7zipFile or pathConfig.isPathRootedAtDriveLetter _7zipFile then _7zipFile 
 	else pathConfig.appendPath folder _7zipFile
 	local do7Z = "start /d " + "\""+_7zipDir+"\""+" 7z.exe "
 	local switches = "a -r -t7z -y -ssw -mx"+ compressLevel as string
 	if password != unsupplied do switches += (" -p" + password)
 	DOSCommand (do7Z + switches + " "+ "\"" + _7zipFile + "\"" + " " + "\"" + folder + "\"")
 )
 compressTo7zip folder:@"c:	emp	est" _7zipFile:@"c:	emp\project.7z" compressLevel:5 password:"123456789"
 

For my friend Kostadin IZArc compression method
Disadvantage:

  • slow compression for .zip

  • password supported only for .ZIP, .BH or .JAR archive

  • not so meny options for this archiver (command and switches)

  • need to install IZArc Command Line Add-On (IZARCC.exe)

  • this archiver supports too meny extension but allow to compress in few

  • newly archive not contains any sub-dir inside

  • x86 only

    compressLevel argument must use this strings:
    “0” “Store” | “f” “Fast” | “n” “Normal” | “x” “Maximum”| “b” “maximum(bzip2)”


    fn compressToIZArc folder: izarcFile: compressLevel: password: izarcDir:@"c:\Program Files (x86)\IZArc\" = if doesDirectoryExist folder do
    (
   	 izarcFile = if pathConfig.isPathRootedAtBackslash izarcFile or pathConfig.isPathRootedAtDriveLetter izarcFile then izarcFile 
   	 else pathConfig.appendPath folder izarcFile
   	 local doIZArc = "start /d " + "\""+izarcDir+"\""+" IZARCC.exe "
   	 local switches = "-a -r -e2 -w -c"+ compressLevel
   	 if password != unsupplied do switches += (" -s" + password)
   	 DOSCommand (doIZArc + switches + " "+ "\"" + izarcFile + "\"" + " " + "\"" + folder + "\"")
    )
    compressToIZArc folder:@"c:	emp	est" izarcFile:@"c:	emp\project.zip" compressLevel:"n" password:"123456789"

you be a COMPRESSOR MASTER very soon. you will be able to compress any file in any format manually. just a little more practice and you will be able do it blindfold.

This one is next. I think this is the right one for sure Open source, user friendly GUI, 150+ supported formats, easy commands … what do you need more:)

PeaZip compression solution
What is interesting about this freeware archiver:
when you manually try to compress some files or folder in the process window you can see command-line code with all settings

fn compressToPeaZip folder: peaFile: compressLevel: password:  peaDir:@"C:\Program Files\PeaZip\res\7z\" = if doesDirectoryExist folder do
 (
 	peaFile = if pathConfig.isPathRootedAtBackslash peaFile or pathConfig.isPathRootedAtDriveLetter peaFile then peaFile 
 	else pathConfig.appendPath folder peaFile
 	local doPZ = "start /d " + "\""+peaDir+"\""+" 7z.exe "
 	local switches = "a -t7z -m0=LZMA -mmt=on -md=64m -mfb=64 -ms=4g -sccUTF-8 -mx"+ compressLevel as string
 	if password != unsupplied do switches += (" -p" + password + " -mhe=on")
 	DOSCommand (doPZ + switches + " "+ "\"" + peaFile + "\"" + " " + "\"" + folder + "\"")
 )
 compressToPeaZip folder:@"c:	emp	est" peaFile:"project.rar" compressLevel:9 password:"12345"
Page 3 / 3