View Full Version : tying file rules to folder session
kencl
28-Mar-2006, 11:35 AM
Hi Folks,
Anyone know how to associate a specific file comparison rule to a given folder session? IE when I launch a file diff from folder view, is the file comparison window able to detect that it was launched from within a specific folder session and based on which session that launched it, choose which rule set to use?
Thanks.
Chris
28-Mar-2006, 03:45 PM
BC doesn't have the ability to do this.
When you open a pair of files in the File Viewer, BC looks at the rules list in the Rules section of Tools|Options. It starts at the top of the list until it finds a rule with a matching extension. As soon as it finds a matching rule, it uses it for the comparison.
The other option for selecting rules is to call BC with the /rules= command line option. This forces all File Viewer comparisons to use the specified rule regardless of file extension. This even affects File Viewer comparisons launched from the Folder Viewer.
kencl
29-Mar-2006, 09:54 PM
I've found a work around. When I'm not using what I call "session specific rules", I change the association to *.match_nothing to restore default rule selection behavior. Then when I need them, I change them back to the appropriate associations. In some cases this also means changing the association for the default rule set to *.restore_to_cgi_pl_pm_lib to prevent duplicate association patterns.
This approach doesn't take long to setup, and it allows the next difference function to open the next mismatched file without reverting to the default rules.
Hmm, as I'm sitting here writing this up I'm thinking maybe I can do something with export import settings. I could export the default settings, then create my session specific rule set and export those to a session specific filename. Do you think that importing settings 20 times a day as I switch between sessions would have any adverse effect?
Chris
30-Mar-2006, 02:31 PM
I don't think it should hurt anything to Import/Export rules.
Another option is to create another shortcut to BC with the /rules= command line in it for the specific rules you want.
If that isn't powerful enough, you can also copy your BC directory, then create a file named BC2.xml in the copied folder. This will have BC save its settings to XML files instead of the registry, so you can have two copies of BC each with different settings.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.