Rar filename renamed when packing with additional parameters

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Rekrul
Junior Member
Junior Member
Posts: 69
Joined: 2007-11-04, 21:40 UTC

Rar filename renamed when packing with additional parameters

Post by *Rekrul »

This bug has existed since at least the 6.x versions and is still present in 7.02a;

If any additional parameters are included after RAR.EXE in the Packer configuration screen, then all periods in a filename (except the last one) will be converted to underscores. This does not happen if there are no additional parameters.

For example;

Command in the RAR Packer box: rar.exe
Name given in Pack Window: This.is.a.test.rar
Finished archive name: This.is.a.test.rar

Command in the RAR Packer box: rar.exe -ri1
Name given in Pack Window: This.is.a.test.rar
Finished archive name: This_is_a_test.rar


I have confirmed that this is not a bug in Rar.exe (any version). If the same command is given on the command line, the file will be named as it should be. The renaming only occurs when using TC's Pack option, and when there are additional parameters after Rar.exe in the Packer box.

Note that the same thing happens when you de-select the option to use TC's internal Zip Packer and you enable the option to use ZipNT. All periods except the last one will be converted to underscores. This happens regardless of whether there are any additional parameters after the Zip.exe command or not.

For those who are curious; The parameter "-ri1" tells Rar to use the lowest priority. This is necessary (at least for me) because Rar.exe has a bad habit of locking up Windows 98SE if there are any other tasks running and it can't use 100% of the CPU.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

No problem with WinRar

Post by *Clo »

2Rekrul

:) Hello ! Welcome on board !

• I think that's not a bug really, but an old feature when you set RAR (which is a console executable),
because the old 16-bit DOS-Win didn't support several dots in the file-names…

• Here, I just tested using WinRar in the TC pack-dialogue, that works perfectly, even with your parameter :

Code: Select all

K:\WinRar_3-5\WinRAR.exe -m5 -kb -ri1
The name is rendered correctly with all dots…

- Under Win XP-Pro (Fr.), but it could work too with Win 98 SE…

:mrgreen: Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, that's exactly the problem - when TC cannot determine the version (16- or 32-bit) of rar, it assumes that it's 16-bit and uses DOS-compatible names.
Author of Total Commander
https://www.ghisler.com
Rekrul
Junior Member
Junior Member
Posts: 69
Joined: 2007-11-04, 21:40 UTC

Post by *Rekrul »

I just tried WinRar and it works. Thanks.

I wasn't aware that WinRar.exe could be used from the command line, I thought that only Rar.exe worked that way.

I'm curious though; Why does it only happen when there are additional parameters and not when the command is used by itself?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC has to call a function to determine whether the program is 16- or 32-bit. This fails when I pass not only the program name but also parameters to the function...
Author of Total Commander
https://www.ghisler.com
Post Reply