Change view mode for different FTP sites

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
chasbas
Junior Member
Junior Member
Posts: 52
Joined: 2003-02-06, 16:01 UTC
Location: New Jersey

Change view mode for different FTP sites

Post by *chasbas »

I access different FTP hosts in TC, and my goal is to be able to distinguish among them by color. This seems pretty straightforward, but for some reason I find no mention of this capability anywhere.

I assume the best way to go about this is to define different View Modes and then create an Auto Switch Mode rule, but I have been unable to come up with a combination of sub-rules that accomplishes this.

To my mind, the F sub-rule ("FTP Connection") would have a field next to it with the name (or partial name) of a matching (or not matching) FTP connection. That would be clear and easy to use.

Since that doesn't exist I tried using additional sub-rules along with F, but it appears that F cannot be AND-ed with any other sub-rule. Can someone else confirm this? If that's true, can anyone think of a different way for me to accomplish my goal?

(Just to illustrate what I've tried: I made a rule for a directory xyz:

Code: Select all

+Must Match:  *xyz\*
This tells tc that any directory containing xyz as a current or parent directory should be selected. It works fine.
Then I add a new sub-rule, combined with the above sub-rule using an OR:

Code: Select all

F:FTP Connection
Now the rule says any xyz directory, OR any FTP site, should be selected. This also works great.
But if I change the OR to AND, to only select xyz directories from an FTP site, nothing gets selected.
I realize that even if this solution worked it wouldn't help me with my goal, but the fact that it *doesn't* work convinces me that there is *no way* to accomplish my goal, since FTP cannot be AND-ed with *anything*.)
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

Not sure if this is the cause of the problem, but keep in mind that paths in FTP usually use the forward slash (/) as directory delimiter.

What happens if you change your path pattern from "*xyz\*" to "*xyz/*"?

(Side note: Most FTP servers run on some Unix-like OS, which use '/' as directory delimiter, while allowing '\' to be an ordinary character in file names just like 'a' or 'b'...)
chasbas
Junior Member
Junior Member
Posts: 52
Joined: 2003-02-06, 16:01 UTC
Location: New Jersey

Post by *chasbas »

elgonzo wrote:Not sure if this is the cause of the problem, but keep in mind that paths in FTP usually use the forward slash (/) as directory delimiter.

What happens if you change your path pattern from "*xyz\*" to "*xyz/*"?
I had actually tried this. TC decides that any Directory with a / in it really belongs in the File Types field; it concatenates the Directory value with the File Types value and puts the result in the File Types field, while blanking out the Directory field. To verify this you have make TC re-load this Rule - clicking briefly on a different Rule, then back to the current Rule, will show how the new information has been stored.

This behavior is so specific that it seems like it is done by design, rather than being a bug.
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2chasbas
Apparantly TC can't handle directory names with / in the Auto Switch Mode rules.

But this seems to work:

1. First set the F -rule
2. Then add the second rule (AND): +Must Match: *xyz*

Now the rule will be applied on an FTP connction, where the directory path contains xyz.

It also will work for subdirectories to xyz

Unfortunately it will not work in the root of the FTP-site - so you cannot enter the site name as the directory - like: *ftp.mysite.mydomaine*
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

chasbas wrote:I had actually tried this. TC decides that any Directory with a / in it really belongs in the File Types field; it concatenates the Directory value with the File Types value and puts the result in the File Types field, while blanking out the Directory field. To verify this you have make TC re-load this Rule - clicking briefly on a different Rule, then back to the current Rule, will show how the new information has been stored.

This behavior is so specific that it seems like it is done by design, rather than being a bug.
That sounds indeed like a bug. This should be posted in the bug sub-forum...
...and filed: http://ghisler.ch/board/viewtopic.php?p=337753
Post Reply