Windows – Open .rar file without extracting

command linerarwindows

I want to view the files that are archived in .rar file without extracting with full path.

This is to be done through command-line. The .rar file may contain various files, I want to extract only the latest one.

Best Answer

You can use the command unrar -l file.rar to get the contents of the RAR file without having to extract it. You can download unrar for DOS command line in various file repositories.

I can't think of a way an extractor would know what file is the latest one.

If your requirement changed to pick the most recent file from the extracted set, there are many tools to do this from command. For example, for cygwin, you can use the find command to look for the newest file within a directory very easily.

Edit:

If you want to use PowerShell to find the most recent file...

Related Question