Page 1 of 1

Need help setting up CFA for specific path

Posted: 18 Jul 2026 13:56
by MBaas
I'd like to set up a CFA that is valid in one folder only - isn't that possible?

|"Bibel importieren|:foretab" \git\bible_databases\formats\json\*.json > "python import_bible_database.py <curitem>"


When I open CFAs while being on a .json in that folder, that item is not suggested. What am I missing?

Re: Need help setting up CFA for specific path

Posted: 19 Jul 2026 18:40
by admin
That's not possible. CFAs are global.

Wrong! See below...

Re: Need help setting up CFA for specific path

Posted: 20 Jul 2026 11:47
by eil
Though for some reason i apparently have same false idea, like somebody in the past showed CFA working for the specific path(don't remember where i saw that), maybe this theoretical hint could work instead: CFA that uses a script, which instead checks what is the location and selects proper app to work with that file type.

Re: Need help setting up CFA for specific path

Posted: 20 Jul 2026 12:20
by admin
Indeed, you are right!

CFAs can be defined for specific paths, e.g.:
C:\Users\Donald\Desktop\Test\*.txt>C:\Users\Donald\AppData\Local\Programs\EmEditor\EmEditor.exe

Re: Need help setting up CFA for specific path

Posted: 20 Jul 2026 12:44
by MBaas
Great! But why isn't it working for me then?

Re: Need help setting up CFA for specific path

Posted: 20 Jul 2026 12:50
by admin
\git\bible_databases\formats\json\ does not look like a valid path.

Re: Need help setting up CFA for specific path

Posted: 20 Jul 2026 13:13
by MBaas
Even with the drive-specification it doesn't show up on the file C:\Git\bible_databases\formats\json\YLT.json

Re: Need help setting up CFA for specific path

Posted: 21 Jul 2026 12:48
by eil
@MBaas you need to show the full CFA line you're trying to use, cause your initial example in the first message couldn't work for sure(no proper paths there).

Re: Need help setting up CFA for specific path

Posted: 21 Jul 2026 16:14
by MBaas
It hasn't changed muched - I just added the driver letter:
|"Bibel importieren|:foretab" C:\Git\bible_databases\formats\json\*.json>"python import_bible_database.py <curitem>"

Re: Need help setting up CFA for specific path

Posted: 21 Jul 2026 23:57
by eil
Your pattern contains: Name| Icon| specific path extension > ... where is the path for app to open json? For the very least XY doesn't know where is that .py script. Plus i'm not sure(i may be wrong here) if XY can handle opening item with non-executable but "some" script + arguments, and all that in CFA.
More confident local scripters would probably know better.

Re: Need help setting up CFA for specific path

Posted: 22 Jul 2026 07:06
by MBaas
I tweaked it a bit and added the exact path of the py script (though i don't think that would have prevented XY from showing it) and suddenly it is working!

|"Bibel importieren|:foretab" C:\Git\bible_databases\formats\json\*.json>::run"""%TCC%"" /C python c:\git\BibleImport\import_bible_database.py <curitem>";goto "c:\Git\BibleImport\output";

Ok, tbh - I also noticed the checkbox wasn't set :oops: I don't know when and why this happened - but I guess that was the reason all the time. I need new glasses!
Thanks for your help!