Archive File (FILE)
Use the Archive File adapter command (FILE) to produce a compressed archive file in the map directory. Data passed from the output card is ignored.
FILE,archive_name,files_to_zip[,FLAT]
archive_name
Specify the name of the resulting archive file.
,
The comma is a required separator between options.
files_to_zip
Specify the file to be archived. The files_to_zip must be a fully qualified path. If the file name is not a fully qualified path, the adapter returns a success status, but the file is not added to the archive.
("longfilename"). Do not include spaces before the first
file name or after the last file name.-
When a fully qualified path is provided, the drive letter is excluded from the archive entry.
For example, adding C:\temp\sample.log will result in the zip file containing:
temp\sample.log
-
When a network share path is provided, the hostname and shared directory will not be used for the archive entry.
For example, adding \\hostname\share\temp\sample.txt, will result in the zip file containing: temp\sample.txt
-
The Zip file must not contain entries with the same name (duplicate entries) otherwise the map will fail.
For example, adding C:\temp\sample.txt alongside \\hostname\share\temp\sample.txt, and/or the relative path temp\sample.txt will result in the map failure with an error: duplicate entry: temp/sample.txt
This is because all three paths have the same entry in the zip and they can not co-exist.
- Relative paths containing .. are replaced with ~ in the archive entry to avoid problems in the zip files.
FLAT
- When the FLAT parameter is specified, only the filename is used in the archive entry.
Specifying the same filename in two different directories will result in map failure.
For example, for filename dir1\*.log dir2\*.log, if dir1 and dir2 both contain sample.log, the map will fail with an error: duplicate entry: sample.log.