Treat the text after the first dot as an extension

Features wanted...
Post Reply
John_C
Posts: 336
Joined: 16 May 2018 20:04

Treat the text after the first dot as an extension

Post by John_C »

Some files have double extension, for example file.tar.gz.

When such files are copied to another location, or duplicated, or renamed, XY incorrectly treats file.tar as base filename and gz as extension.

Thus, it could be useful to add the checkbox to treat any text after the first dot as an extension.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Treat the text after the first dot as an extension

Post by bdeshi »

the extension really is gz.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Treat the text after the first dot as an extension

Post by John_C »

An extension is a special part of a filename that indicates how it should be used by software.

Thus, I consider both "tar" and "gz" as extensions from the common-sense point of view. If you take aaa.tar.gz file and rename "aaa" to "bbb" - there will be no problems. But if you rename "tar" to "bar" - you will not be able to extract it.
Last edited by John_C on 14 Dec 2019 18:50, edited 2 times in total.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Treat the text after the first dot as an extension

Post by bdeshi »

sure you can, it should extract to an "aaa.bar" file.

Code: Select all

$ gzip -d aaa.bar.gz
a .tar.gz file is a gz (gzip) archive that contains a tar archive. Extracting the gz and tar both in one go is software magic. there's no header difference between a regular .gz file and a tar.gz file.

Anyway, I suspect we're coming at it from two different viewpoints.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply