Error occurred when deleting folders inside an encrypted 7-Zip archive.

Moderators: petermad, Stefan2, white, Hacker

geshou
Junior Member
Junior Member
Posts: 4
Joined: 2026-05-16, 07:56 UTC

Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *geshou »

I can't delete folders inside an encrypted 7-Zip archive, and an error prompt pops up.It’s probably an issue with password handling — the system doesn’t ask for a password at all when trying to delete the folders.
User avatar
petermad
Power Member
Power Member
Posts: 17307
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *petermad »

I cannot reproduce that - I tried both with and without filenames also encrypted. Tested with TC 11.57 32bit and 64bit

I pack and unpack with TC's internal packer - do you do the same? Did you pack the archive yourself or did you achieve it form somewhere else?
Which version of TC are you using?
License #524 1994
Danish TC Translator
TC 11.57 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1413b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
geshou
Junior Member
Junior Member
Posts: 4
Joined: 2026-05-16, 07:56 UTC

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *geshou »

Maybe I didn't explain it clearly enough. What I mean is this:create a password-encrypted 7Z archive first, then try to delete a folder inside the archive — it will prompt an error.Strangely, if you select one file plus one folder at the same time and try to delete them, it will ask for the password, and you can delete them successfully.
You can test it yourself: encrypt and compress the FastCopy installation folder, then try to delete the log folder inside it. You’ll see it can’t be deleted.
Total Commander version: 11.57
User avatar
white
Power Member
Power Member
Posts: 6883
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *white »

Confirmed.

Steps taken:
* Copy tcmd1157x32.exe to test\1\tcmd1157x32.exe
* Copy tcmd1157x32.exe to test\2\tcmd1157x32.exe
* Select the folder "test" and pack using 7zip and encryption
* Restart TC if you enabled to save passwords!
* Open the archive test.7z
* Open the folder test.7z\test
* Try to delete folder test.7z\test\1
User avatar
white
Power Member
Power Member
Posts: 6883
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *white »

Moderator message from: white » 2026-05-17, 10:17 UTC

Moved topic
» from Total Commander (English) to TC11.x bug reports (English)
User avatar
petermad
Power Member
Power Member
Posts: 17307
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *petermad »

I can reproduce it but only under these conditions:
1. When I open the archive (after having restarted TC) Remember password has to be deselected
2. The archive has to be packed either as a Solid archive or with Encryption of Filenames - or both.

I get a different error message depending on the setting:
1. With Solid archive enabled, but Encryption of Filenames deselected I get this message:
Error
Unsupported operation: Ikke implementeret
Notice mixed English and Danish - so Windows must be involved (I am testing with TC in internal English mode)

2. If Encryption of Filenames is enabled (Solid or not) I get this message
Error
Could not open the archive. Wrong password?
3. If I choose to remember the Password when opening the archive I can always delete content.

Also, with Remember password disabled and Encryption of Filenames enabled I am asked for the password the first time I enter the archive (as expexted), but if I exit the archive and re-enter it I am NOT asked for the password - that is wrong and a security breach.
License #524 1994
Danish TC Translator
TC 11.57 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1413b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52908
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *ghisler(Author) »

1. With Solid archive enabled, but Encryption of Filenames deselected I get this message:
Error
Unsupported operation: Ikke implementeret
You get this error because 7-zip requires a password to re-pack the remainder of the solid archive after removing the file you wanted to delete. Currently it's not possible to handle this case with the internal dll. The error you see is coming directly from tcbit7z.dll. The only way to delete a file in this case is to view a file, where you can then choose to remember the password.
2. If Encryption of Filenames is enabled (Solid or not) I get this message
Error
Could not open the archive. Wrong password?
This error is also coming from tcbit7z.dll, it requires the password beforehand, which Total Commander cannot know.

Edit: There is code which should react to an "invalid password" error with asking for a new password, but in both cases above I'm getting an I/O error back from the 7zip dll. It's possible that this worked once with an older version of the dll.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6883
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *white »

17.05.26 Fixed: Internal 7-zip packer: Delete function couldn't handle missing or bad password when deleting from encrypted solid or header-encrypted archive (32/64)
Tested OK using TC 11.57a pre3 32-bit and 64-bit.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52908
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *ghisler(Author) »

Thanks for checking! I had to modify tcbit7z.dll because it was missing the implementation of an interface (ICryptoGetTextPassword), which resulted in the "not implemented" error.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52908
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *ghisler(Author) »

Please re-check with Total Commander 11.57a RC1!
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6883
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *white »

Tested OK using TC 11.57a rc1 32-bit and 64-bit.
User avatar
petermad
Power Member
Power Member
Posts: 17307
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *petermad »

Tested OK in 32bit and 64 bit YC 11.57a rce .- tested with solid archive, name encryption and both.

With name encryption I get an extra password request after deleting - but that is OK.
License #524 1994
Danish TC Translator
TC 11.57 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1413b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
geshou
Junior Member
Junior Member
Posts: 4
Joined: 2026-05-16, 07:56 UTC

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *geshou »

The issue still exists on my end.
I tested it with the FastCopy installation folder, selected solid compression, encrypted the archive, and then tried to delete the "log" folder inside the compressed file, but an error occurred and it couldn't be deleted.

https://i.ibb.co/ynFQtHjX/hz769-ikqwt.gif
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52908
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *ghisler(Author) »

This fix is about the internal 7-zip packer. You are getting an error from 7z itself, so apparently you are using external 7z exe for packing. In this case, 7z should ask for the password.

Please test with with option "Use internal 7-zip packer" checked in Configuration - Options - 7-Zip Packer.
Author of Total Commander
https://www.ghisler.com
geshou
Junior Member
Junior Member
Posts: 4
Joined: 2026-05-16, 07:56 UTC

Re: Error occurred when deleting folders inside an encrypted 7-Zip archive.

Post by *geshou »

Testing works fine when 'Use internal 7-zip packer' is checked. Thanks for your hard work!
Post Reply