我需要找到要移动到具有特定名称和.txt扩展名的文件夹中的文件.我见过这两个例子都用过:
file_check = FileSensor(
task_id='check_file',
filepath='filepath/to/folder/*.txt'
)
和
file_check = FileSensor(
task_id='file_check',
filepath='filepath/to/folder/example_file*'
)
如何找到名称中包含特定字符串的文件,例如"Example_FILE_2023-01-01.txt"的"Example_FILE"和.txt/csv文件扩展名?
这两种方法中有哪一种管用吗?
file_check = FileSensor(
task_id='file_check',
filepath='filepath/to/folder/example_file**.txt'
)
file_check = FileSensor(
task_id='file_check',
filepath='filepath/to/folder/example_file*.txt'
)
我不确定气流的球体匹配是否允许**或AND条件,以及球体匹配是否可以这样使用.
谢谢你的帮忙!