TC9.50b4: `LOADSELECTION "%COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst"` does not select anything

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
andry81
Junior Member
Junior Member
Posts: 97
Joined: 2018-11-22, 19:17 UTC

TC9.50b4: `LOADSELECTION "%COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst"` does not select anything

Post by *andry81 »

`01.lst` having these lines:

```
mydir1\
myfile
```

The active panel has having these files.
The list consists from file names only, there is no a path prefix.

The `COMMANDER_SCRIPTS_ROOT` variable is a registered environment variable (in the Windows registry) and shows up in the cmd console window by the `set COMMANDER_SCRIPTS_ROOT` command.

The same command works from the main menu: `Mark->Load Selection From File`, even if the list file extension is `.lst` instead of `.txt`.
User avatar
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: TC9.50b4: `LOADSELECTION "%COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst"` does not select anything

Post by *Stefan2 »

From where and how do you execute your command?

If you use an EnvVar in the parameter box of an button, you have to double the %-signs
(works like in a DOS batch versa direct command console input)

Or put the whole command inclusive the parameter in the Command box.




To try that out you can use:

CMD: cmd /k echo %commander_path%
PARAM:

CMD: cmd /k
PARAM: echo %commander_path%

CMD: cmd /k
PARAM: echo %%commander_path%%



HTH?
andry81
Junior Member
Junior Member
Posts: 97
Joined: 2018-11-22, 19:17 UTC

Re: TC9.50b4: `LOADSELECTION "%COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst"` does not select anything

Post by *andry81 »

I use a button bar dialog:

Command: `LOADSELECTION "%COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst"`
Parameters: <empty>
Start path `%COMMANDER_SCRIPTS_ROOT%\myscripts\`
Icon file: `%COMMANDER_SCRIPTS_ROOT%\myscripts\images\icon.ico`
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC9.50b4: `LOADSELECTION "%COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst"` does not select anything

Post by *petermad »

Try with:
LOADSELECTION %COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst
instead of:
`LOADSELECTION "%COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst"`

This button works fine for me:

Code: Select all

TOTALCMD#BAR#DATA
LOADSELECTION %COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst

wcmicons.dll,42



-1
1. Mark the green text above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctri+C).
3. Right click on TC's buttonbar and choose "Paste".[/quote]

Be carefull that there is ony one space between LOADSELECTION and %COMMANDER...
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
andry81
Junior Member
Junior Member
Posts: 97
Joined: 2018-11-22, 19:17 UTC

Re: TC9.50b4: `LOADSELECTION "%COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst"` does not select anything

Post by *andry81 »

Without quotes it works. But there said it is parameterized command. How then a command would use more parameters?
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC9.50b4: `LOADSELECTION "%COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst"` does not select anything

Post by *petermad »

How then a command would use more parameters
LOADSELECTION only accepts one parameter - a filename, so I guess that is why Ghisler chose not to support/allow quotes
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC9.50b4: `LOADSELECTION "%COMMANDER_SCRIPTS_ROOT%\.saveload\file_lists\01.lst"` does not select anything

Post by *ghisler(Author) »

Indeed no double quotes are allowed here.
Author of Total Commander
https://www.ghisler.com
Post Reply