usage of multiarc

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Fietzel1982
Junior Member
Junior Member
Posts: 6
Joined: 2005-09-01, 09:45 UTC

usage of multiarc

Post by *Fietzel1982 »

Hallo,

I'm trying to use multiarc with the SAP-compression tool SAPCAR.EXE, but I don't know how to configure multiarc.ini.
I was able to bring Total Commander to display the files in the CAR-archive, but I'm not able to extract them and to display the correct folder structure in TC.

Can anybody give me a parameterlist of the %-Parameters?
How do I have to configure the line?: Extract=%P -xvf %AQ -R %FWQ
How do I have to configure the line?: Format0="nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"

And what is the task of this line?
Does there exists an explanation of this configuration file?


Here is my multiarc.ini


[SAPCAR]
IDPos=0
Debug=0
Description=SAR/CAR Entpacker
Extension=sar,car
Extension=car
Start="^BEGIN -- -------- "
End="^END ---- -------- "
Archiver=c:\TotalCommander\Packer\sapcar\SAPCAR.exe
Format0="nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"

List=%p -tv -f %aq
Extract=%P -xvf %AQ -R %FWQ
; -R D:\SAPExtract\
Delete=%p -d %a %F
Add=%p -r %a %F
AskMode=1
SkipLIST=2
[MultiArc]
ConMode=2
ConMinimize=0
ConExclude=1
ConAClose=1
ConDelay=4
ConLines=4
ConRect=2C00000000000000020000000083FFFF0083FFFFFFFFFFFFFFFFFFFF58000000740000005803000056020000A7
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Ehehe, just wait until the moderators move this thread to the Plugins forum ;-)
I switched to Linux, bye and thanks for all the fish!
User avatar
deus-ex
Power Member
Power Member
Posts: 979
Joined: 2003-02-10, 17:45 UTC

Post by *deus-ex »

@Fietzel1982

An organized description of Multiarc's ini-parameters:

Code: Select all

TypeName                      = Format name.

ID (optional)                 = Archive ID (2-digit hex numbers delimited with spaces).

IDPos (optional)              = ID position in archive. If absent will be searched in starting
                                part of archive.

Extension                     = Archive format extension (without dot). Multiple extensions can
                                be defined, separated by comma (,).

Debug (optional)              = Write all archiver output to log file "multiarc.%TYPENAME%.log"
                                in same directory as multiarc.wcx. %TYPENAME% is derived from
                                TypeName Key of archiver description.

List                          = Command to produce listing. Gets appended with an archive name.

IgnoreErrors (optional)       = Ignore archiver exit code. Use with caution.

Start (optional)              = Any part of line in listing after which processing is started.
                                Text is searched everywhere in lines. If text starts with '^',
                                search begins from second symbol of every line.

End (optional)                = Any part of line in listing to stop processing. Text is searched
                                everywhere in lines. If text starts with '^', search begins from
                                second symbol of every line.

SkipEmpty (optional)          = Files with empty names will not be added to list.

SkipDirsInFileList (optional) = Do not add directory entries in filelist.

UnixPath (optional)           = Activate if path in outputlist is in Unix format.

InputString (optional)        = This string will be send to standard input stream, i.e. this
                                emulates "pressing" a key.

SearchForUglyDirs (optional)  = Force MultiArc to search and correct archiver listings for directory
                                entries that doesn't have a trailing '\' to make them readable for
                                WinCommander. Use only when REALLY NEEDED, it may slow down performance.

BatchUnpack (optional)        = Instead of unpacking one by one files will be unpacked at "archive closing
                                phase" with one list and ONE call of archiver. This is VERY useful for "solid"
                                archives but the unpacking progress will not display a real percentage.

Format0 ... Format7
  Listing format:
  n - file name
  . - remove trailing spaces from filename and append name with dot
  z - unpacked size
  c - file description
  p - packed size
  d - day
  t - month
  TTT - three letter month name (Jan, Feb, Mar ...)
  y - year
  h - hours
  H - hours modifier letter (a = a.m., p = p.m.)
  m - minutes
  s - seconds
  a - attributes
  e - file extension
  * - skip until first space or end of line


Variables used in command lines:

  %P - long name of archive program (as in "Archiver" key)
  %p - short name of archive program (as in "Archiver" key)
  %A - long name of archive file
  %a - short name of archive file
  %L - Filelist containing long filenames
  %l - Filelist containing short filenames
  %F - Single filename to process. Archiver is called several times
       until all files are executed. Use only if the archiver does'nt
       support filelists.
  %E<errorlevel> - Maximum accepted command errorlevel.
       For example %E2 indicates that Errorlevels 0, 1 and 2
       are acceptable. If absent only Errorlevel 0 is considered a success.
  %O - By default Multiarc converts archiver output from OEM encoding to ANSI.
       Apply to skip encoding.
  %R - Target subdirecory IN archive
  {} - If a variable is enclosed in braces it will only be added if it is
       non-empty. Works only with %R variable.
  %S - Mode dependent. If set in the configuration dialog MultiArc requests
       additional command-line parameters.

  Variable modifiers Q, q, W, P, A can be used to change filename format details.
  May be specified immediately after variables without spaces:

  Q - quote names with spaces
  q - quote all names
  W - use name only, without path
  P - use path only, without name
  A - use ANSI encoding
For further details you can refer to the help-file of the Multiarc distribution and take a look at the addon examples as well.


Regards,
deus-ex
Fietzel1982
Junior Member
Junior Member
Posts: 6
Joined: 2005-09-01, 09:45 UTC

Post by *Fietzel1982 »

Thank you, this list is very helpful. My TC is now able to display files and the folder structure of my car-archives.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Fietzel1982 wrote:. My TC is now able to display files and the folder structure of my car-archives.
So you may want to publish the multiarc sectiopn here to share it with others?

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Fietzel1982
Junior Member
Junior Member
Posts: 6
Joined: 2005-09-01, 09:45 UTC

Post by *Fietzel1982 »

As I said, this configuration can only SHOW CAR-archives correctly and I only tested it on my PC! Maybe on other PCs with another configuration it does not work. If you want to use it you have to customize the Archiver path

Code: Select all

Archiver=c:\TotalCommander\Packer\sapcar\SAPCAR.exe
to your path.
I am not sure if this line works correctly, but it worked in my system with my testdata:

Code: Select all

Format0="*c*ppppppppppppp TTT dd hh:mm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnne"
With this configuration file you can also extract data from car archives, but only in a static folder and only ALL files in the archive. It is written in this line:

Code: Select all

Extract=%P -xvf %AQ -R d:\SAPExtract

If you need a better extraction routine I suggest you put this line in your TC Start menu (Start->Change start menu... -> add Item):

Command:

Code: Select all

C:\TotalCommander\Packer\sapcar\sapcar.exe
Parameters:

Code: Select all

-xvf %p%n -R %T
Shortcut key:

Code: Select all

CRTL+ALT+F5
Of course with your sapcar.exe-Path.



AND THIS IS MY MULTIARC.INI (If I find out something new I will post it in this forum):

Code: Select all

[SAPCAR]
IDPos=0
Debug=0
UnixPath=1
Description=SAR/CAR Entpacker
Extension=sar,car
Extension=car
Start="^BEGIN -- -------- "
End="^END ---- -------- "
Archiver=c:\TotalCommander\Packer\sapcar\SAPCAR.exe
Format0="*c*ppppppppppppp TTT dd hh:mm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnne"

List=%P -tv -f %AQ
Extract=%P -xvf %AQ -R d:\SAPExtract

;Delete=%p -d %a %F
;Add=%P -cvf %AQ %R%F

AskMode=0
SkipLIST=2
[MultiArc]
ConMode=2
ConMinimize=0
ConExclude=1
ConAClose=1
ConDelay=4
ConLines=4
ConRect=2C00000000000000020000000083FFFF0083FFFFFFFFFFFFFFFFFFFF58000000740000005803000056020000A7
rIQ
Junior Member
Junior Member
Posts: 7
Joined: 2007-04-12, 08:55 UTC

Post by *rIQ »

This code works for me so far

Code: Select all

[CAR]
Description=SAP compression utility
Archiver=%COMMANDER_PATH%\plugins\wcx\sapcar\sapcar.exe
Extension=car
IDPos=0
ID=23 20 43 41 52 20 61 72 63 68 69 76 65 20 68 65 61 64 65 72
Debug=1
UnixPath=1
#Start=""
#End=""
Format0="cccccccccc  zzzzzzzzz  TTT dd hh:mm   nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnne"
List=%PQA -tvf {%S} %aQA

#real cmds
Extract=%PQA -xvf %aQA {%F} {%L}
ExtractWithPath=%PQA -xvf %aQA {%F} {%L}
Test=%PQA -tvf %aQA
#Add=%PQA -avf %aQ %R%F
AskMode=0
SkipEmpty=1
SearchForUglyDirs=1
BatchUnpack=1


[SAR]
Description=SAP compression utility
Archiver=%COMMANDER_PATH%\plugins\wcx\sapcar\sapcar.exe
Extension=sar
IDPos=0
ID=43 41 52 20 32 2e 30
Debug=1
UnixPath=1
Start="SAPCAR: processing archive"
#End=""
Format0="cccccccccc  zzzzzzzzzz    dd TTT yyyy hh:mm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnne"
List=%PQA -tvf %aQ 

#real cmds
Extract=%PQA -xvf {%S} %aQA {%F}
ExtractWithPath=%PQA -xvf %aQA {%F} {%L}
Test=%PQA -tvf %aQA
#Add=%PQA -avf %AQ %R%F
AskMode=0
SkipEmpty=1
SearchForUglyDirs=1
BatchUnpack=1

Asdert
New Member
New Member
Posts: 1
Joined: 2011-10-14, 08:29 UTC

Post by *Asdert »

This modification works goods for me with SAPCAR.exe
work F3, F4, F5 on selected files, ALT+F9 on archive

[SAR]
Description=SAP compression utility
Archiver=%COMMANDER_PATH%\plugins\wcx\sapcar\sapcar.exe
Extension=sar
IDPos=0
ID=43 41 52 20 32 2e 30
Debug=1
UnixPath=1
Start="SAPCAR: processing archive"
#End=""
Format0="cccccccccc zzzzzzzzzz dd TTT yyyy hh:mm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnne"
List=%PQA -tvf %aQ

#real cmds
Extract=%PQA -xvf {%S} %aQA {%F}
ExtractWithPath=%PQA -xvf %aQA %F
Test=%PQA -tvf %aQA
#Add=%PQA -avf %AQ %R%F
AskMode=0
SkipEmpty=1
SearchForUglyDirs=1
BatchUnpack=1
Post Reply