[BUG] Drag&Drop to a button transfers 8.3 filename...

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
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

[BUG] Drag&Drop to a button transfers 8.3 filename...

Post by *icfu »

...when parameters are added in field "Command".

Examples:

Code: Select all

Command: %comspec% /k echo
Command: pspad.exe X:\file1
Icfu
This account is for sale
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I hope it stays that way, otherwise I can't drag-and-drop to buttons with some of my old 16-bit programs.

Anyway - It is on purpose - Ghisler once wrote in the beta-test forum:
If you don't use parameters and drag something to a button, the short name is passed to the program (%p%n).
See also: http://www.ghisler.ch/board/viewtopic.php?p=99245 - es stimmt aber nichts! - at least I can't make it work for files on my local harddisk.

Since that posting is old, I tested it in TC 6.54 and TC 6.57 - and there it works to put %P%N in the Parameters field :!: So we got a lost feature here :!:
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I hope it stays that way, otherwise I can't drag-and-drop to buttons with some of my old 16-bit programs.
Of course you can, just write %p%n in parameter field...
If you don't use parameters and drag something to a button, the short name is passed to the program (%p%n).
This is outdated information:
HISTORY.TXT wrote:26.01.07 Added: Button bar: When dropping a file to a program on the button bar, pass the long name instead of the short DOS name 8...]
Icfu
This account is for sale
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

This is outdated information:
You are right! - Sorry :oops:

But the whole quote is:
26.01.07 Added: Button bar: When dropping a file to a program on the button bar, pass the long name instead of the short DOS name to the program (in double quotes "" if needed) if the program isn't an old 16-bit program. If this causes problems, put %p%n in the parameters field of the button
So it seems that TC detects if the program in the Command field is 16-bit, which explains why d&d to my 16-bit programs still works without a %p%n parameter.

It must also mean that TC considers cmd.exe to be a 16-bit program !?

Is your pspad.exe 16-bit?

If I drag&drop to a button with plainedit.exe (32-bit, no parameters) I get the long file name in the title bar. If I drag to superpad.exe (16-bit, no parameters) I get the short 8.3 filename in the titlebar. I even get the short name when I do set the parameters to %P%N with superpad.exe.
Last edited by petermad on 2008-01-06, 20:37 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Confirmed.

Tested with this button:

Code: Select all

Command: %comspec% /k echo
Parameters: %P%S
Clicking on the button does echo the correct long name,
but dropping a file on it gives the short 8.3 name (only %p%s should do that).
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

But the whole quote is:
No idea what happened to my quote, something went wrong when copying & pasting, very strange.
It must also mean that TC considers cmd.exe to be a 16-bit program !? Is your pspad.exe 16-bit?
Nope, the problem with 8.3 filename is ONLY when in the COMMAND field there is a parameter behind program.exe!

So, when dragging and dropping to this button, the long filename is transfered:

Code: Select all

Command: pspad.exe
Icfu
This account is for sale
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

the problem with 8.3 filename is ONLY when in the COMMAND field there is a parameter behind program.exe!
Right - I can confirm that with PlainEdit.exe
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed in this case the Windows function do determine whether a program is 16- or 32-bit will fail...
Author of Total Commander
https://www.ghisler.com
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Confirmed---

Post by *Clo »

2petermad

:) Hello Peter !

• I can confirm too here using xED tabbed text editor (Delphi-written programme…).
- I have …\xed.exe -fs (Full Screen), and I get the 8.3 names.
- But I'm bound to keep that parameter, or else its window is never maximized :
The [ × ] Run maximized option does nothing… :(

:mrgreen: FR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Post Reply