Extract .7z archive keeping modified dates of extracted folders

2

I have a .7z archive created with 7zip, and I can see the contents, including the folders with their modified dates intact.

When I extract the archive however, the newly extracted folders all have the created and modified dates set to the time and date they were extracted - i.e. the modified date that is visible in the archive is lost.

I've tried to extract via the 7-zip file manager has the same effect, and the command I'm using to extract the files is:

7za x -t7z SourceArchive.7z -oE:\TargetFolder 

this uses the x command (eXtract files with full paths) and uses the switches:

-t - Target Type, in this case 7z archive
-o - Output directory - here E:\TargetFolder

Any help appreciated

Fetchez la vache

Posted 2016-02-18T15:20:36.543

Reputation: 119

Answers

2

Extracted folders have the created/modified date set to the time/date of extraction

This is a known feature request (#1174), Status: open.

See also this 7-Zip discussion thread ZIP archive folder date preservation.


#1174 Preserve original file creating\edit dates when extracting

enter image description here

Now when files are extracted their creating date, edited date are set to current time despite in archive they could have their own dates, an option to preserve those would be very nice.

...

The hard part is already done. If you just right-click and under 7-zip, extract here/to, it should perform as expected.

After testing it appears that the above comment is incorrect and doesn't work.

Source #1174 Preserve original file creating\edit dates when extracting

DavidPostill

Posted 2016-02-18T15:20:36.543

Reputation: 118 938

Thanks for the detailed response David. Unfortunately that was the first thing I tried. It was upon failing using the above method that lead me to try the command line. – Fetchez la vache – 2016-02-18T15:52:50.280

Ah. OK.. I can reproduce here. It looks like the comment in the feature request "The hard part is already done. If you just right-click and under 7-zip, extract here/to, it should perform as expected." is incorrect, so there is no workaround. Answer updated. – DavidPostill – 2016-02-18T16:21:13.553

Thanks David no worries. Helpful nonetheless. – Fetchez la vache – 2016-02-18T16:27:41.263