7-zip: drag & drop "forgets" folder timestamps
7-zip: drag & drop "forgets" folder timestamps
HI,
I noticed when I drag & drop a compressed folder structure from 7-zip the original folder timestamps aren't restored whereas with deflating from 7-zip they are. Is this a general "restriction" of the drag & drop mechanism?
Thanks,
FH
I noticed when I drag & drop a compressed folder structure from 7-zip the original folder timestamps aren't restored whereas with deflating from 7-zip they are. Is this a general "restriction" of the drag & drop mechanism?
Thanks,
FH
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: 7-zip: drag & drop "forgets" folder timestamps
I'd say that's the responsibility of the receiving app. The paths are passed to it, so it can easily find out about the dates.
FAQ | XY News RSS | XY Twitter
Re: 7-zip: drag & drop "forgets" folder timestamps
XYplorer is the drop target, thus I assumed it would be XY's duty. But I don't know nothing about how drag & drop works under the hood.
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: 7-zip: drag & drop "forgets" folder timestamps
Whoops, did not read close enough. I'll check that...
FAQ | XY News RSS | XY Twitter
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: 7-zip: drag & drop "forgets" folder timestamps
No, wait, I saw something...
FAQ | XY News RSS | XY Twitter
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: 7-zip: drag & drop "forgets" folder timestamps
Well, it looks like browsing a path the first time after its creation will reset its modified date to NOW. But this is only part of the truth since it is not the case in other contexts. Windows is doing something here that I have not seen before, probably something "smart". I will look at it again later. For now: Cannot stop this from happening. Same happens in Explorer, too, BTW.
FAQ | XY News RSS | XY Twitter
Re: 7-zip: drag & drop "forgets" folder timestamps
Hi Don,
thanks for investigating. When I read about „smartness“ I fear the day OSes will become subject to AI.
FH
thanks for investigating. When I read about „smartness“ I fear the day OSes will become subject to AI.
FH
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: 7-zip: drag & drop "forgets" folder timestamps
I my pathological urge to surpass Explorer I managed to add a workaround that, uhm, works around it, at least here. Let me know if it works for you as well. Next beta...
FAQ | XY News RSS | XY Twitter
Re: 7-zip: drag & drop "forgets" folder timestamps
Seems not to be fixed with 19.60.0101, and it appears to be even more complicated as the behavior is somewhat different depending on what folder (hierarchy) is used as the drop source.
1. When I drag&drop the (single) root folder (which is XY's data folder):
For the root folder in the archive creation time is restored, modified time not. For the children folders (AutoBackup etc.) either timestamps aren't restored.
2. When I drag&drop the 1st order children (AutoBackup etc.) their creation time is not restored, modified time however is (so it's the opposite behavior of 1.).
From my visual observations on the 1st order children (AutoBackup etc) it seems that 7-zip is restoring the archived folders with the original creation date and then doing an update of the modified date in a "second pass" because at first XY shows the latter with age of 0 or 1s.
I could send you my archive file if required tomorrow.
1. When I drag&drop the (single) root folder (which is XY's data folder):
For the root folder in the archive creation time is restored, modified time not. For the children folders (AutoBackup etc.) either timestamps aren't restored.
2. When I drag&drop the 1st order children (AutoBackup etc.) their creation time is not restored, modified time however is (so it's the opposite behavior of 1.).
From my visual observations on the 1st order children (AutoBackup etc) it seems that 7-zip is restoring the archived folders with the original creation date and then doing an update of the modified date in a "second pass" because at first XY shows the latter with age of 0 or 1s.
I could send you my archive file if required tomorrow.
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: 7-zip: drag & drop "forgets" folder timestamps
The archive creation time? Why should that be restored in the extracted contents?
AFAIK, archives don't store the Created Date but only the Modified Date of their contents. And I agree one could expect to have that date preserved after extraction. According to the laws of Windows, the Modified Date of a folder is updated when its contents are changed, hence you see the top folders Modified Date set to NOW (it does not happen with subfolders though, which makes the whole thing look like a Windows bug, like they forgot to actively restore the date in the top level folders). However, in the recent beta, XYplorer works around this. At least here this works well with Zip, 7zip and WinRAR archives.
Just to make sure: What I'm testing here is dragging things out of an archive into XYplorer.
AFAIK, archives don't store the Created Date but only the Modified Date of their contents. And I agree one could expect to have that date preserved after extraction. According to the laws of Windows, the Modified Date of a folder is updated when its contents are changed, hence you see the top folders Modified Date set to NOW (it does not happen with subfolders though, which makes the whole thing look like a Windows bug, like they forgot to actively restore the date in the top level folders). However, in the recent beta, XYplorer works around this. At least here this works well with Zip, 7zip and WinRAR archives.
Just to make sure: What I'm testing here is dragging things out of an archive into XYplorer.
FAQ | XY News RSS | XY Twitter
Re: 7-zip: drag & drop "forgets" folder timestamps
No the folders creation time, at least 7-zip does.
See screenshot above.
This is what my qestion is about. On Win 10 and 7 after extraction by drag&drop from 7-zip the creation time from the archive isn't restored but instead set to now.
It's no biggie just something I didn't understand, hence I was asking.
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: 7-zip: drag & drop "forgets" folder timestamps
I have old versions of WinZip and WinRAR, that explains the difference in stored data. Maybe also the difference in the results of the fix.
If it does not work with newer versions I can as well remove the "fix".
So, bottomline: Can't help it.
If it does not work with newer versions I can as well remove the "fix".
So, bottomline: Can't help it.
FAQ | XY News RSS | XY Twitter
Re: 7-zip: drag & drop "forgets" folder timestamps
I would leave it in, so that users of the older versions will benefit.
Never mind! Thanks for helping.