TC doesn't preserve the creation date when users extract files from 7z archive

Please report only one bug per message!

Moderators: sheep, Hacker, Stefan2, white

misvin
Junior Member
Junior Member
Posts: 72
Joined: 2010-08-14, 11:25 UTC

TC doesn't preserve the creation date when users extract files from 7z archive

Post by *misvin » 2019-06-26, 11:11 UTC

Hi,

TC 9.22a doesn't preserve the creation date when users extract files from 7z archive.
wincmd.ini: CopyAllTimes=1

Scenario:
1. 7z archive was created using the native 7-Zip 19.00 GUI with "tc=on" parameter (tc stands for creation date&time).
Full parameter string from "Add to Archive" window: x=9 yx=9 qs tc=on ta=on

2. When I extract files from 7z archive using native 7-Zip 19.00 GUI, all files preserve the source creation and modified date&time.

3. When I extract files from 7z archive using TC, all files preserve the source modified date&time, but the creation date&time = Current Date&Time
Note: On the TC left panel I enter inside 7z archive, select a file from the archive, and extract it to the right panel using F5 Copy command.

Thanks

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3439
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *Horst.Epp » 2019-06-26, 14:36 UTC

Not confimed !
Created an archive with 7z x64 version 19.00 and parameter tc=on.
Copied file from this archive with TC internal 7z support and also with Total7zip plugin.
In both cases the creation and modification dates are restored.
Windows 10 Home x64 November 2019 Update, Version 1909 (OS Build 18363.476)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.50ß5 x64 / x86, Everything 1.4.1.956 (x64)

User avatar
Usher
Power Member
Power Member
Posts: 584
Joined: 2011-03-11, 10:11 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *Usher » 2019-06-26, 22:44 UTC

2misvin
Do you unpack files to local filesystem or to some network/virtual drive?
Regards from Poland
Andrzej P. Wozniak

misvin
Junior Member
Junior Member
Posts: 72
Joined: 2010-08-14, 11:25 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *misvin » 2019-06-27, 00:27 UTC

I have the same (incorrect) behavior using TC native F5 Copy command on several platforms:
1. Windows 10 Pro x64 May 2019 Update, Version 1903 (OS Build 18362.175); AMD A8 Processor; TC 9.22a (64-bit), 7zip 19.00 (64-bit)
Unpack from the local hard disk (Partition C:) to the same hard disk (Partition C: or E:)
2. Windows 8.1 Enterprise (32-bit) on VirtualBox VM; TC 9.22a (32-bit); 7zip 19.00 (32-bit).
Unpack from the Partition C: (Guest) to the same Partition or to shared folder (Host Drive E:).

I don't use the Total7zip plugin. When I extract files using 7Zip Context Menu in TC, all works OK (creation dates are preserved).

Additionally, I use custom columns:
[CustomFields]
Contents1=[=tc.size.bytes]\n[=tc.writedate]\n[=tc.creationdate]\n[=tc.attributestr]
Headers1=Size\n Modified Date\n Creation Date\nAttr.
Options1=-1|1|96
Titles=Default
Widths1=274,40,-60,-62,-62,-20

When I browse inside 7z Archive in TC, I don't see the creation date (the column is empty).
In the native 7Zip 19.00 I see both modified and creation dates.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38160
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *ghisler(Author) » 2019-06-27, 09:47 UTC

CopyAllTimes has no influence on unpacking, only on copying. It depends on the used 7z plugin or 7z dll whether the creation date is unpacked with the files or not.
Author of Total Commander
http://www.ghisler.com

User avatar
tuska
Power Member
Power Member
Posts: 1681
Joined: 2007-05-21, 12:17 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *tuska » 2019-06-27, 16:29 UTC

2misvin
For me, your differences in practice are as follows:

1. 7-Zip - WITH parameter: x=9 yx=9 qs=on tc=on ta=on --> 7-Zip stores NTFS timestamps for files
2. 7-Zip - WITHOUT parameters: x=9 yx=9 qs=on tc=on ta=on --> 7-Zip uses standard parameters
3. TC Zip-Packer: %COMMANDER_PATH%\Tools\7-Zip\7zFM.exe   --> TC uses standard parameter of 7-Zip
    ☑ Use internal ZIP packer

ad 1. 7-Zip - WITH parameter
When I create a .7z file - WITH parameters - using the context menu of 7-Zip and then extract the files in TC with F5 Copy,
the file properties will be preserved 1:1.

ad 2. 7-Zip - WITHOUT parameters
When I create a .7z file - WITHOUT parameters - with 7-Zip and then extract the files in TC with F5 Copy,
the file properties are only partially preserved, i.e. the creation date and the last access date are updated.

ad 3. TC Zip-Packer - 7zFM.exe
When I create a .7z file with TC command cm_PackFiles and then extract the files in TC with F5 Copy,
then the file properties are only partially preserved, i.e. the creation date and the last access date are updated.

What I find decisive is the method (parameter yes/no) used to pack the files.

Code: Select all

Help: 	Search for "Parameter", click on "-m (Set compression Method) switch", then scroll to "7z".
x=9 	x=[0 | 1 | 3 | 5 | 7 | 9 ] --- Default 5 --- Sets level of compression.
yx=9 	yx=[0 | 1 | 3 | 5 | 7 | 9 ] --- Default 5 --- Sets level of file analysis.
qs=on 	qs=[off | on]  --- Default: off --- Sort files by type in solid archives. 
tc=on 	tc=[off | on]  --- Default: on  --- Stores NTFS timestamps for files: Modification time, Creation time, Last access time. --> ZIP!
tc=on   tc=[off | on]  --- Default: off --- Stores Creation timestamps for files.	--> 7z!
ta=on	ta=[off | on]  --- Default: off --- Stores last Access timestamps for files.
Regards,
Karl
EDIT1:
tc=on tc=[off | on] --- Default: on --- Stores NTFS timestamps for files: Modification time, Creation time, Last access time. --> ZIP!
tc=on tc=[off | on] --- Default: off --- Stores Creation timestamps for files. --> 7z!
Last edited by tuska on 2019-06-28, 10:26 UTC, edited 1 time in total.

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3439
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *Horst.Epp » 2019-06-27, 17:59 UTC

tuska wrote:
2019-06-27, 16:29 UTC
2misvin
For me, your differences in practice are as follows:

1. 7-Zip - WITH parameter: x=9 yx=9 qs=on tc=on ta=on --> 7-Zip stores NTFS timestamps for files
2. 7-Zip - WITHOUT parameters: x=9 yx=9 qs=on tc=on ta=on --> 7-Zip uses standard parameters
3. TC Zip-Packer: %COMMANDER_PATH%\Tools\7-Zip\7zFM.exe   --> TC uses standard parameter of 7-Zip
    ☑ Use internal ZIP packer

ad 1. 7-Zip - WITH parameter
When I create a .7z file - WITH parameters - using the context menu of 7-Zip and then extract the files in TC with F5 Copy,
the file properties will be preserved 1:1.

ad 2. 7-Zip - WITHOUT parameters
When I create a .7z file - WITHOUT parameters - with 7-Zip and then extract the files in TC with F5 Copy,
the file properties are only partially preserved, i.e. the creation date and the last access date are updated.

ad 3. TC Zip-Packer - 7zFM.exe
When I create a .7z file with TC command cm_PackFiles and then extract the files in TC with F5 Copy,
then the file properties are only partially preserved, i.e. the creation date and the last access date are updated.

What I find decisive is the method (parameter yes/no) used to pack the files.

Code: Select all

Help: 	Search for "Parameter", click on "-m (Set compression Method) switch", then scroll to "7z".
x=9 	x=[0 | 1 | 3 | 5 | 7 | 9 ] --- Default 5 --- Sets level of compression.
yx=9 	yx=[0 | 1 | 3 | 5 | 7 | 9 ] --- Default 5 --- Sets level of file analysis.
qs=on 	qs=[off | on]  --- Default: off --- Sort files by type in solid archives. 
tc=on 	tc=[off | on]  --- Default: on  --- Stores NTFS timestamps for files: Modification time, Creation time, Last access time.
ta=on	ta=[off | on]  --- Default: off --- Stores last Access timestamps for files.
Regards,
Karl
Long story :)
let me say it in short:
If time stamps are stored in a 7zip archive they will be restored with TCs native 7z DLLs and also using the Tota7zip plugin.
So I can't confirm the thread starters behaviour, at least in a normal environment.
Windows 10 Home x64 November 2019 Update, Version 1909 (OS Build 18363.476)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.50ß5 x64 / x86, Everything 1.4.1.956 (x64)

User avatar
Usher
Power Member
Power Member
Posts: 584
Joined: 2011-03-11, 10:11 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *Usher » 2019-06-27, 19:46 UTC

Horst.Epp wrote:
2019-06-27, 17:59 UTC
let me say it in short:
If time stamps are stored in a 7zip archive
…and it's enough to add ta=on parameter, as tc=on by default…
Horst.Epp wrote:
2019-06-27, 17:59 UTC
they will be restored with TCs native 7z DLLs and also using the Tota7zip plugin.
…unless you use some buggy 7zip version or unpack files to some external file system which is not fully supported…
Regards from Poland
Andrzej P. Wozniak

User avatar
tuska
Power Member
Power Member
Posts: 1681
Joined: 2007-05-21, 12:17 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *tuska » 2019-06-28, 10:35 UTC

Usher wrote:
2019-06-27, 19:46 UTC
Horst.Epp wrote:
2019-06-27, 17:59 UTC
let me say it in short:
If time stamps are stored in a 7zip archive
…and it's enough to add ta=on parameter, as tc=on by default…
Sorry, but tc=off by default in 7-Zip…

Code: Select all

Parameter: x=9 yx=9 qs=on tc=on ta=on
tc=[off | on] --- Default: on   --- Stores NTFS timestamps for files: Modification time, Creation time, Last access time. --> ZIP!
tc=[off | on] --- Default: off ---  Stores Creation timestamps for files. --> 7z!

I have corrected my post above :oops:

User avatar
Usher
Power Member
Power Member
Posts: 584
Joined: 2011-03-11, 10:11 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *Usher » 2019-06-28, 15:58 UTC

2tuska
Thanks for quick fix-up. It's so hot that every brains are almost out ;-)
Regards from Poland
Andrzej P. Wozniak

User avatar
tuska
Power Member
Power Member
Posts: 1681
Joined: 2007-05-21, 12:17 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *tuska » 2019-06-28, 16:34 UTC

2Usher
Yes, unfortunately, it was my fault.

By the way, with the support of forum participants in the German forum, and especially from Dalai
I created this button using 7-Zip.

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Tools\7-zip\7z.exe
a %T_7z -mx=9 -myx=9 -mtc=on -mta=on @%UL
%COMMANDER_PATH%\Tools\7-zip\7zFM.exe
%COMMANDER_PATH%\Tools\7-zip\7z.exe|a %T_7z -mx=9 -myx=9 -mtc=on -mta=on @%UL|"_7z.7z" [left or right] created. Unpack: File properties are preserved!|https://ghisler.ch/board/viewtopic.php?p=356745#p356745|https://ghisler.ch/board/viewtopic.php?f=2&t=53100


-1
The file properties (creation date, modification date, last access date) are retained after unpacking.

Regards,
Karl

misvin
Junior Member
Junior Member
Posts: 72
Joined: 2010-08-14, 11:25 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *misvin » 2019-06-29, 07:27 UTC

2ALL
Thanks for your reply.

Additional information:
1. In my environment, the built-in TC unpacker does not preserve the creation date when I extract files not only from 7z archive, but also from ZIP archives.
The problem does not exist if I use external tools (7z.exe, 7zFM.exe for 7z and ZIP formats) and native Windows 10 File Explorer unpacker (for ZIP format). When I use these tools, both modified and creation date & time are preserved.

2. To investigate the problem, I ask you to inform me, if you see the creation timestamp inside 7z and zip archives when TC uses a custom column with the creation date.
misvin wrote: Additionally, I use custom columns:
[CustomFields]
Contents1=[=tc.size.bytes]\n[=tc.writedate]\n[=tc.creationdate]\n[=tc.attributestr]
Headers1=Size\n Modified Date\n Creation Date\nAttr.
Options1=-1|1|96
Titles=Default
Widths1=274,40,-60,-62,-62,-20

When I browse inside 7z Archive in TC, I don't see the creation date (the column is empty).
3. To find the root cause of my problem:
3.1. I created in the native 7-Zip 19.00 (64 bit) GUI application two archives in 7z and ZIP formats: test.7z and test.zip. Each archive contains 3 files with information about the dates of file creation.
3.2. After that, I created a new VirtualBox VM Guest with the following configuration:
Windows 10 Pro x64 May 2019 Update, Version 1903 (OS Build 18362.207); TC 9.22a (64-bit).
I have not installed 7-Zip in this virtual machine.
3.3. I moved test.7z and test.zip from the Host to VM Guest (c:\Users\misvin\Downloads\)
3.4. When I copied (3+3) files from test.7z and test.zip archives using the TC F5 command to c:\Users\misvin\Documents, the creation timestamp of all 6 files was not preserve.

3.5. When I extracted the files using native Windows 10 File Explorer unpacker (for the test.zip file), both modified and creation date & time were preserved.

User avatar
tuska
Power Member
Power Member
Posts: 1681
Joined: 2007-05-21, 12:17 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *tuska » 2019-06-29, 11:33 UTC

misvin wrote:1. In my environment, the built-in TC unpacker does not preserve the creation date
Not confirmed in my environment.
Windows 10 Pro (x64) Version 1903 (OS Build 18362.207) | TC 9.22a x64/x86
misvin wrote:2. ... if you see the creation timestamp inside 7z and zip archives when TC uses a custom column with the creation date.
No, only modification date is shown (always).

Code: Select all

[=tc.writedate.D.M.Y h:m:s]

User avatar
tuska
Power Member
Power Member
Posts: 1681
Joined: 2007-05-21, 12:17 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *tuska » 2019-06-29, 17:55 UTC

2misvin
Could you test this please?

1. create a 7-Zip archive with parameters
2. unpack the files with F5 Copy or cm_UnpackFiles in TC
3. right click (in TC or Windows Explorer) on the unzipped file
4. click on "Properties"

Is the creation date, modification date, and last access date now displayed correctly?

If the content of a packed file is displayed in TC, e.g. with Ctrl + PgDn,
then a "custom columns view" will always only show the modification date - even when using various plug-ins.
The columns for creation date and last access date remain empty (at least on my PC).

This means that with a "custom columns view" one cannot determine whether the creation date and the last access date
after unpacking have been preserved.

misvin
Junior Member
Junior Member
Posts: 72
Joined: 2010-08-14, 11:25 UTC

Re: TC doesn't preserve the creation date when users extract files from 7z archive

Post by *misvin » 2019-06-29, 19:12 UTC

2tuska
When I describe my problem in this post, I always check the creation date using right click (in TC or Windows Explorer) on the unzipped file.
After unpacking, the creation date is equal to the current date & time, and I see it in the file properties and in my custom TC column "creation date".

Post Reply