How should the command "@disableif:=!Exists("\*.txt")" be written correctly?

I want to create a button that will be in the "enabled" state when a certain type of file exists in the current folder.
The following ways of writing it are incorrect, and I’m not sure how to correct them. Can you help me? Thank you!
@disableif:=!Exists("*.txt")
@disableif:=!Exists(".\*.txt")
@disableif:=!Exists("..\*.txt")

@enableif:=FileCount("*.txt")>0
//or
@disableif:=!Exists(source + "*.txt","w")
//or
@enableif:=Exists(source + "*.txt","w")
1 Like

Thank you very much for your help.

1 Like