- •Is the same as the previous syntax, but accepts attribute value pairs,
- •Xlsfinfo Determine if file contains Microsoft Excel spreadsheet.
- •Internet resource
- •Is a string. Message is either a string or a cell array. If it is a
- •Variables and the Windows registry.
- •Zip file access
- •Individual file can be specified relative to the current directory or
- •Tar file access
- •Individual file can be specified relative to the current directory or
- •Gzip file access
- •Individual file can be specified relative to the current directory or
- •Formatted file I/o
- •Icinterface/fgets
- •If %s is used an element read may cause several matlab matrix
- •Integer NaN as zero.
- •If true, textscan treats
- •File opening and closing
- •It on the matlab search path. On unix systems, filename may also start
- •Binary file I/o
- •If the most recent I/o operation was successful, message is empty
- •Indicator in the specified file. Position is indicated in bytes
- •Memory-mapped file support
- •Is correct for platform it's executed on.
- •Is also a valid partial pathname.
- •Serial port support
- •Instrfind will not find an object with a Name property value of
- •Instrfind will not find an object with a Name property value of
- •Timer support
- •Visible timer objects whose property names and property values match
- •Command window I/o
- •In the current directory. The folder contains an m-file for each web service
Tar file access
<tar> - Compress files into tar file.
TAR Compress files into tar file.
TAR(TARFILENAME,FILES) creates a tar file with the name TARFILENAME
from the list of files and directories specified in FILES. Relative
paths are stored in the tar file, but absolute paths are not.
Directories recursively include all of their content.
TARFILENAME is a string specifying the name of the tar file. The '.tar'
extension is appended to TARFILENAME if omitted. TARFILENAME's
extension may end in '.tgz' or '.gz'. In this case, TARFILENAME is
gzipped.
FILES is a string or cell array of strings that specify the files or
directories to be included in TARFILENAME. Individual files that are
on the MATLABPATH can be specified as partial pathnames. Otherwise an
Individual file can be specified relative to the current directory or
with an absolute path. Directories must be specified relative to the
current directory or with absolute paths. On UNIX systems, directories
may also start with a "~/" or a "~username/", which expands to the
current user's home directory or the specified user's home directory,
respectively. The wildcard character '*' may be used when specifying
files or directories, except when relying on the MATLABPATH to resolve
a filename or partial pathname.
TAR(TARFILENAME,FILES,ROOTDIR) allows the path for FILES to be
specified relative to ROOTDIR rather than the current directory.
ENTRYNAMES = TAR(...) returns a string cell array of the relative path
entry names contained in TARFILENAME.
Example
-------
% Tar all files in the current directory to the file backup.tgz
tar('backup.tgz','.');
See also gzip, gunzip, untar, unzip, zip.
Reference page in Help browser
doc tar
<untar> - Extract contents of tar file.
UNTAR Extract contents of tar file.
UNTAR(TARFILENAME) extracts the archived contents of TARFILENAME into
the current directory and sets the file's attributes. On Windows, the
hidden, system and archive attributes are not set. UNTAR overwrites an
existing file with the same name as the archive name if the existing
file's attributes and ownership permit; otherwise a warning is issued.
TARFILENAME is a string specifying the name of the tar file.
TARFILENAME is gunzipped to a temporary directory and deleted if its
extension ends in '.tgz' or '.gz'. If an extension is omitted, UNTAR
searches for TARFILENAME appended with '.tgz', '.tar.gz' or '.tar'
until a file exists. TARFILENAME can include the directory name;
otherwise, the file must be in the current directory or in a directory
on the MATLAB path.
UNTAR(TARFILENAME,OUTPUTDIR) extracts the archived contents of
TARFILENAME into the directory OUTPUTDIR. OUTPUTDIR is created if it
does not exist.
UNTAR(URL, ...) extracts the tar archive from an Internet URL.
The URL must include the protocol type (e.g., 'http://' or 'ftp://').
The URL is downloaded to the temp directory and deleted.
FILENAMES = UNTAR(...) extracts the tar archive and returns the
relative path names of the extracted files into the string cell array,
FILENAMES.
Examples
--------
% Copy all *.m files in the current directory to the directory 'backup'
tar('mymfiles.tar.gz','*.m');
untar('mymfiles','backup');
% Untar and list Cleve Moler's Numerical Computing with MATLAB examples
% to the output directory 'ncm'.
url ='http://www.mathworks.com/moler/ncm.tar.gz';
ncmFiles = untar(url,'ncm')
See also fileattrib, gzip, gunzip, tar, unzip, zip.
Reference page in Help browser
doc untar