Automation 如何找到任何;txt";文件在系统中的特定位置?

Automation 如何找到任何;txt";文件在系统中的特定位置?,automation,rpa,automationanywhere,g1ant,Automation,Rpa,Automationanywhere,G1ant,我有一个机器人在系统中的某个特定位置查找给定名称的文件,但现在我想在该特定位置查找所有文本文件。我曾尝试使用“*.txt”,但没有成功。有办法吗 file.exists ♥environment⟦USERPROFILE⟧\Documents\t.txt errormessage ‴Sorry, I could not find a file‴ dialog ‴File exists‴ 您可以使用该命令。模式参数允许您筛选出特定扩展名的文件 directory path ♥environment

我有一个机器人在系统中的某个特定位置查找给定名称的文件,但现在我想在该特定位置查找所有文本文件。我曾尝试使用“*.txt”,但没有成功。有办法吗

file.exists ♥environment⟦USERPROFILE⟧\Documents\t.txt errormessage ‴Sorry, I could not find a file‴
dialog ‴File exists‴
您可以使用该命令。
模式
参数允许您筛选出特定扩展名的文件

directory path ♥environment⟦USERPROFILE⟧\Desktop pattern *.txt result ♥files
dialog ♥files⟦count⟧
上面的代码应该让您知道给定目录中存在多少具有给定扩展名的文件

您可以从返回的列表中获取值,并将其与
file.exists
命令一起使用