Shell Commands/XADUnFile

From MorphOS Library

< Shell Commands

From the original xadmaster.library manual:

XADUnFile - The master shell tool to extract data from file archives.

FROM/A, DEST=DESTDIR, PASSWORD/K, FILE/M, NAMESIZE/K/N, FFS=OFS/S, SFS/S, INFO=LIST/S, Q=QUIET/S, AM=ASKMAKEDIR/S, OW=OVERWRITE/S, SP=SHOWPROT/S, VERBOSE/S, DARC=DISKARCHIVE/S, ENTRY/K/N, DIMG=DISKIMAGE/S, NA=NOABS/S, NC=NOCOMMENT/S, ND=NODATE/S, NE=NOEXTERN/S, NKP=NOKILLPART/S, NP=NOPROT/S, NT=NOTREE/S

	FROM specifies the file archive that should be handled.
	The xadUnFileM tool can handle splitted archives, when they are
	given in their correct order. Do not give multiple names of
	single archives! You may use patterns with xadUnFileM.

	DESTDIR is the destination directory. The directory is created
	when it does not exist (except if ASKMAKEDIR is turned on and
	you select no). There are some dangerous archives using absolute
	path names (e.g. starting with LIBS: or RAM:). xadUnFile archives
	these files to their absolute position (except NOTREE or NOABS is
	used). For xadUnFileM this argument requires the keyword DEST or
	DESTDIR.

	PASSWORD can be used to supply a password for unarchiving of
	encrypted archives. This argument requires the keyword PASSWORD.

	FILE allows you to select filename(s) (including patterns), which
	should be extracted. When FILE is not given, all files are
	extracted. With FILE only matching files are extracted.
	NOTE: When you do not use NOTREE keyword, the patterns check
	includes checks for directory structure as well.
	For xadUnFileM there are some special rules:
	  To pass multiple names, use patterns like (xxx|yyy|zzz), where
	  xxx, yyy and zzz are three file names. You cannot pass multiple
	  strings like for xadUnFile. And additionally this argument
	  requires the keyword FILE.

	NAMESIZE allows to specify the maximum size of a filename. This is
	useful as some archives from unix machines have longer filenames
	than the Amiga filesystem allows. Whenever a name is longer than
	the namesize value, you are asked to enter a shorter name. Names
	of directories are truncated without requests.
	FFS or OFS replace NAMESIZE argument and provide a standard length
	of 30 characters, which is the value of our standard file system.
	SFS provide a length of 107 characters, the SmartFilesystem
	standard.

	NOEXTERN prohibits the use of external clients for
	recognition purposes.
	
	INFO or LIST prints information about the archive and does not
	do any unarchiving. SHOWPROT turns on display of protection
	information. VERBOSE shows additional information texts, which
	exist for some archivers.
	
	OVERWRITE forces the program to overwrite an already existing
	destination file. Normally you are asked about that.
	
	NOTREE skips all directory names and writes the files directly to
	destination directory.
	
	ASKMAKEDIR forces the program to ask you, if a missing directory
	should be created.
	
	NOCOMMENT prevents setting archived file comments, NOPROT prevents
	setting file protection bits and NODATE prevents setting date
	information. NOCOMMENT also prevents displaying comment lines with
	INFO or LIST keyword.
	
	NOABS prevents creation of absolute path names.

	If you specify NOKILLPART keyword, partial or corrupt output files
	no longer are deleted.

	The QUIET option turns off the progress report, but also disables
	questions to skip, rename or overwrite files.

	The tool allows to extract files from disk images. If you specify
	DISKIMAGE, the input file is handled as disk image (ADF file)
	and not as file archive. If it is an valid Amiga filesytem disk,
	files can be extracted from it. Specifying DISKARCHIVE is like
	DISKIMAGE, but input data is an disk archive, which is dearchived
	before extracting files. If the disk archive has multiple entries,
	you may use ENTRY keyword to specify the wanted entry. When using
	DISKIMAGE, you may specify an device name like DF0: instead of
	a file name. The input data will then be read from the device.

Example:

	Shell> xadUnFile archive.tar RAM:
		Unarchive the tar archive to RAM:

	Shell> xadUnFile archive.lha RAM: #?.txt #?.doc Contents
		Unarchive all .txt and .doc file and the file "Contents" of
		lha archive to RAM:

	Shell> xadUnFileM archive.lha DEST RAM: FILE (#?.txt|#?.doc|Contents)
		The same call for xadUnFileM

	Shell> xadUnFile archive.lha LIST
		Tells information about archive.lha file.

	Shell> xadUnFile image.adf DIMG LIST
		Tells information about files in disk image image.adf.

	Shell> xadUnFileM archive.lha archive.l[0-9]? LIST
		Tells information about splitted lha archive.