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

Please report only one bug per message!

Moderators: sheep, Hacker, Stefan2, white

Post Reply
andry81
Junior Member
Junior Member
Posts: 8
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 » 2019-11-08, 09:57 UTC

`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: 2643
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 » 2019-11-08, 10:54 UTC

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?
Inofficial FAQs || WIKI (Deu/Eng) || TC Home (What's new? // FAQ // Download // Order // Addons // Tools // Plugins)
Erst wenn der letzte Baum gefällt oder die letzte Biene verendet ist, werden die Leute verstehen warum Umweltschutz wichtig ist.

andry81
Junior Member
Junior Member
Posts: 8
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 » 2019-11-08, 11:13 UTC

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: 8818
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

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

Post by *petermad » 2019-11-08, 17:24 UTC

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 9.5b3 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

andry81
Junior Member
Junior Member
Posts: 8
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 » 2019-11-08, 18:04 UTC

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: 8818
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

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

Post by *petermad » 2019-11-08, 21:46 UTC

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 9.5b3 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38116
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) » 2019-11-11, 11:18 UTC

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

Post Reply