[BUG]: cm_CopyNamesToClip lowercase drive.

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

User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

[BUG]: cm_CopyNamesToClip lowercase drive.

Post by *wanderer »

Prior to TC7, when cm_CopyNamesToClip and other relevant commands are used, the copied filename had and uppercase drive letter (i.e. "C:\filename"). in TC7, the drive letter has become lowercase (i.e. "c:\filename"). I think this change was a sideeffect of something else that had been discussed here before (upper/lower-case drive letters on tabs). I'd appreciate it if it could be changed to work as in TC6.5.

Thanks.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

Soz in Linix u could call this bug but since
under windows it doesnt matter if C:\ or c:\
its not a bug...

PS: Nice new avatar but a bit blury...
Hoecker sie sind raus!
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Sir_SiLvA wrote:Soz in Linix u could call this bug but since
under windows it doesnt matter if C:\ or c:\
its not a bug...
I know but i consider this a bug since it seems it's an unintentional side-effect (and after all, it irritates me! :) ).
Sir_SiLvA wrote:PS: Nice new avatar but a bit blury...
I know, i've edited an image i found somewhere but it didn't come out 100% ok... Well, when i have the time to re-edit it.....
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

UPPER = BETTER !

Post by *Clo »

2wanderer

:) Hello !

• Personally, I prefer also uppercase for the drives letters, it's easier to spot and more aesthetic…

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

2Clo

I thought so too but to be honest, after seeing it in TC v7.0pb2 it didn't look that good. I guess i'm used to lowercase. It would certainly be more clear though to see letters like I, J, L than i, j, l.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50421
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I got complaints that TC uses lowercase drive letters almost everywhere, just not in cm_CopyNamesToClip, so I changed it.

Here is the relevant line from the history.txt:
16.01.07 Fixed: cm_CopyFullNamesToClip copied drive letters in uppercase
Author of Total Commander
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

ghisler(Author) wrote:I got complaints that TC uses lowercase drive letters almost everywhere, just not in cm_CopyNamesToClip, so I changed it.

Here is the relevant line from the history.txt:
16.01.07 Fixed: cm_CopyFullNamesToClip copied drive letters in uppercase
:!: :( :(

I thought it was unintentional, i hadn't realized you did this on purpose.

I suppose since you made that change you expected that someone would complain about it being lowercase and you can't make all users happy (what else is new) but this is how it worked up to now (uppercase) and this is how explorer and most other programs are using it so my vote would be to keep it uppercase.

You may think this might be a silly reason for which to create new parameter(s) in wincmd.ini but please do so in order to let the user decide how to have it (upper or lowercase). I don't mind seeing lowercase drive letters in tabs but since i use cm_CopyNamesToClip a lot to copy/paste pathnames, i find it irritating that i have to manually go and make the drive letter uppercase afterwards. Someone may think i'm nuts but i am doing this with TC7.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

wanderer,
Hier ein kleines AHK Skript, dass die Arbeit fur dich erledigt:
[EDIT] Oops, should've read here a small AHK script that does the work for you:

Code: Select all

Clipboard := RegExReplace(Clipboard, "[a-z]:\\", "$u0")
HTH
Roman
Last edited by Hacker on 2007-04-27, 15:41 UTC, edited 3 times in total.
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

:?: :?: :?:
Sorry i speak only English...
:D :D :D

From the "code" part, i understand that you are prompting me to use AHK Script. Thanks for the tip but so far i have refused to follow this logic so i don't think i will start now.

The reason i'm using TC is because it contains many built-in tools in one program which is working very conveniently most of the time. There are few things that are missing, but with a few standard plugins i'm using, it's not a big problem anymore. If i wanted (and had the time) to write code in order to adjust all the programs i use to my needs, i wouldn't be using them, i would be rewriting them myself! :) Ok, just joking but i hope i made my point.

Anyway, many thanks for your tip but at this time i prefer to express my opinion in order to influence TC's behavior (if i can) than writing 100 pages of scripts in order to adjust it to work the way i like. :)
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

It's up to you. :) You can complain and keep doing things the difficult way, or you can complain and do things the easy way. ;)

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Hacker wrote:It's up to you. :) You can complain and keep doing things the difficult way, or you can complain and do things the easy way. ;)

Roman
Well, i'm afraid if i do things "the easy way", i'll stop complaining! :lol: If we all did that, it wouldn't be so good for TC...
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

We are two !

Post by *Clo »

2wanderer

:) Hello !
…You may think this might be a silly reason for which to create new parameter(s) in wincmd.ini
but please do so in order to let the user decide how to have it (upper or lowercase). …
• I agree and support ! Not a big deal to add, I guess…
- And one entry more or less… :P
…I find it irritating that I have to manually go and make the drive letter uppercase afterwards.
Someone may think I'm nuts but I am doing this with TC7. …
• So, we are two to do so ! :wink:

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Hacker wrote:here a small AHK script that does the work for you:

Code: Select all

Clipboard := RegExReplace(Clipboard, "[a-z]:\", "$u0")
Hi Hacker

Since i can't stand this irritating behavior any more and since i don't see it changing in the near future, i reluctantly decided to follow your suggestion and use AHK. After playing with it for a while and understood how it works, i successfully utilized your script (again, thanks for it). However, i found out that it supports only filenames with English characters. If non-English characters exist in the filename, it ruins them. Any ideas on why this is happening (TC or AHK's fault?) and how it could be resolved?

TIA
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Sorry, I do not know. I haven't experimented that much with non-english characters (as this is something I am always trying to avoid). However, I found two threads on the AHK forum that might be helpful if someone decides to pick up.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Hacker wrote:However, I found two threads on the AHK forum that might be helpful if someone decides to pick up.
Yes, they were very helpful. Problem solved! :) It seems to work fine, though i'm not 100% sure it will work correctly in all cases. Anyway, thanks for all the help.

Here is the final script:

Code: Select all

;Converts the drive letter of paths contained in the clipboard to uppercase (i.e. c:\test to C:\test)

;#NoTrayIcon
#Persistent
#SingleInstance force
return

OnClipboardChange:
  if (A_EventInfo=1) {
    transform, ca_Clip, unicode ; get clipboard text in UTF-8
    ca_Clip := RegExReplace(ca_Clip, "[a-z]:\", "$u0")
    transform, Clipboard, unicode, %ca_Clip%
  }
  return
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Post Reply