Switch -LOG[fmt][=name] - write names to log file

WinRAR

Switch -LOG[fmt][=name] - write names to log file


This switch allows to write archive and file names to specified text file in archiving, extracting, deleting commands for RAR format and in archiving commands for ZIP format. Its behavior is defined by 'fmt' string, which can include one or more of following characters:

A Write archive names to log file. If WinRAR creates or processes volumes, all volume names are logged.
F Write processed file names to log file. It includes files added to archive and extracted, deleted or listed files inside of archive.
P If log file with specified name is exist, append data to existing file instead of creating a new one.
U Write data in Unicode format.

If neither 'A' nor 'F' are specified, 'A' is assumed.

'name' parameter allows to specify the name of log file. It must be separated from 'fmt' string by '=' character. If 'name' is not present, WinRAR will use the default rarinfo.log file name.

It is allowed to specify several -log switches in the same command line.

This switch can be particularly useful, when you need to process an archive created with -ag or -v switches in a batch script. You can specify -loga=arcname.txt when creating an archive and then read an archive name generated by WinRAR from arcname.txt with an appropriate command batch file command, like: set /p name=<arcname.txt.

All functions of this switch are supported for RAR format only. In case of ZIP format only archiving operations are supported. Other archive formats do not support this switch.

Examples

  1. write names of created volumes to vollist.txt

WinRAR a -v100m -loga=vollist.txt volume.rar c:\data

  1. write the generated archive name to backup.txt in Unicode

WinRAR a -ag -logau=backup.txt backup.rar myfiles\*

  1. write names of tested volumes to vollist.txt and names of tested archived files inside of volumes to filelist.txt

WinRAR t -log=vollist.txt -logf=filelist.txt volume.part01.rar