2
1
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.
2
1
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.
1
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...
thanks for the help. OS in win7. Is it possible through powershell to get the newest file after getting the list of .rar file contents? – Geek2014 – 2014-10-04T12:41:28.023
Yes, it is possible. See my edit. – Sun – 2014-10-04T13:56:17.800
0
if you have winrar installed by default in windows, for a bare list of files inside the compressed archive (ie .rar file) you can issue this command:
"%programfiles%\winrar\rar.exe" lb file.rar
in the directory where winrar is installed, you can try rar /? | more
for other available options, like full technical listing (rar lta
), archiving (rar a
), extracting (rar x
) etc
2I'm not sure what your problem is exactly. Do you want to just view the files in the RAR, or do you want extract the newest file form the RAR? – Ƭᴇcʜιᴇ007 – 2014-10-01T18:27:29.097
Actually, I want to do both--first view the .rar file contents and then extract the newest file. I want this to be done through command line so that I could use those commands in my powershell script. Thanks for asking the clarification and desire to help. – Geek2014 – 2014-10-04T03:23:00.450
Please specify what OS you want to run command line for. – Sun – 2014-10-04T04:20:38.067