Viewing files


When "View file" command is used for an archive, the archive will be opened and its contents shown in the file list. When applied on a usual file, the file data will be displayed in the internal viewer window regardless of file contents or configuration settings. We can still load the archive data in internal viewer with "Open in internal viewer" command available for archives in WinRAR file list context menu or with corresponding Ctrl+Q keyboard shortcut.

If we press Enter on a file name, several different outcomes are possible. If file under the cursor is an archive, WinRAR displays its contents. For non-archive files further actions depend on settings specified in Viewer settings dialog. This dialog allows to force WinRAR to always use the internal viewer, to open a file in the external viewer, to call a program associated by Windows with this file type or to ask, each time before viewing a file, which action described above shall be executed.

WinRAR can be used to view normal files, whether in an archive or not. If external program is called to view an archived file, WinRAR unpacks this file to temporary folder, passes its name to external program and waits for the program to terminate. After this WinRAR checks the file modification time and if it was updated, offers to update the file in archive. Then it deletes the temporary folder with extracted file.

Scheme described above is modified if Enter is pressed on archived file with extension from "Unpack everything for" list in "Viewer settings" dialog. In this case WinRAR extracts the entire contents of archive to temporary folder and then starts the specified file. After that it takes steps similar to those described above: WinRAR waits for started file to terminate, then checks the modification time of extracted files and if it has been changed or new files have been created, it offers to update the archive. Temporary folder and its contents are then deleted. Such file processing allows to run programs or open multi-file documents directly from an archive.