Button for Chdir and then sort by name

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Steve Adams
Junior Member
Junior Member
Posts: 22
Joined: 2004-08-07, 22:55 UTC
Location: Florida USA

Button for Chdir and then sort by name

Post by *Steve Adams »

Hello Everybody,

I want to create a button on the button bar that will
change the directory and then have that directory sorted by
name, and do this all in one button.

I can get the button to change the dir, but how to do I get
it to sort by name, all in one pick of the button?

Command:
cd C:\Accesories\*.*

I don't want to have to pick the "Name" column header. I tried adding
"cm_SrcByName (Source: Sort by name)" after the chdir command but that
didn't work.
Thanks,

Steve (TC 6.5)
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Twin buttons

Post by *Clo »

2Steve Adams
:) Hello, welcome on board!

¤ That should be simple if you'ld have always the same panel as "active"…
A workaround is to set two buttons side by side, with the commands :

Code: Select all

cm_LeftByName (button #1)
cm_RightByName (button #2)

* Hence, you would have only to press one button to get that you wish, i.e.: when the left panel is active, you press #2, when the right panel is active, you press #1.
- Not sure that the focus follows the command, but it's easy to set it by the TAB key at the same time.
* However, this is not quite satisfactory; to come back to another (favourite) sorting-mode for the active (source) panel, a third button is needed; and the same for the inactive (target) panel. Finally, you could get something like THIS
From left to right : Active panel favourite sorting - LEFT, by name - RIGHT, by name - Inactive panel favourite sorting.
These icons -and a lot of others - are available for free from my Web Page >> Total Commander >> English >>> tcm-plus.zip


Hoping this could help you,
:mrgreen:  Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Hacker
Moderator
Moderator
Posts: 13073
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Steve Adams,
You can either create a Tab with the desired directory and sorting options, then save it and later recall it using the APPENDTABS tabfile command from te Button Bar or the Start Menu,
or you could use Aezay's TC Script Editor (search this forum for Script Editor) to issue those two commands.

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
Steve Adams
Junior Member
Junior Member
Posts: 22
Joined: 2004-08-07, 22:55 UTC
Location: Florida USA

Post by *Steve Adams »

Thanks, Roman.

I think the tabs will be the answer. I am having one problem, though: I can't get the saved tab to show
all the files (*.*) when I opentabs tabfile with a new button I made for that purpose.

For example, I have an older button that opens a directory
on the pane showing *.dwg files only. When I pick the new button that says:

opentabs C:\Accesories\Accesories.tab, I get the proper
directory and sorting that I saved in the file, but the
*.dwg from the last button is still controlling what files are
displayed. (even though the parameters in the button setting are at *.*.)

Any suggestions would be appreciated.
Thanks,

Steve (TC 6.5)
User avatar
Hacker
Moderator
Moderator
Posts: 13073
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Custom filters like *.dwg aren't tab-specific and thus aren't saved with Tabs. Sorry.

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.
Post Reply