在 Pentaho Spoon 中使用多个通配符作为子目录路径
我试图使用 GetFiles 步骤来检索文件名中包含工作表且子目录路径中具有通用名称的 .xlsx 类型的所有文件。
示例目录内容:
c:\DATA\a1 info\a1 z information\a1 box\a1 b2 NEW\a1 sheet.xlsx
c:\DATA\a1 info\a2 zx information\a2 box\a2 b2 NEW\a2 sheet.xlsx
c:\DATA\a1 info\a3 zy information\a3 box\a3 b2 NEW\a3 sheet.xlsx
c:\DATA\a1 task\a1 z task\a1 box\a1 b2 new\sheet.xlsx
c:\DATA\a1 task\a1 z task\a1 box\a1 b2 new\sheet.xlsx
我只想要具有以下约束的文件的文件名:
Home directory is c:\DATA
The first subdirectory having info in the name.
The second subdirectory having information in the name
The third subdirectory having box in the name
The fourth subdirectory having NEW
我已经尝试过,
File/Directory Wildcard (RegExp) Exclude wildcard Required Include subfolders
C:\DATA\ .*.info\.*.information\.*.box\.*.NEW\.*.sheet.*.xlsx N Y
C:\DATA\ .+info\.*.information\.*.box\.*.NEW\.*.sheet.*.xlsx N Y
C:\DATA\ .*info\.*information\.*box\.*NEW\.*sheet.*.xlsx N Y
但我不知所措。 提前致谢。
I was trying to use the GetFiles step to retrieve all files that are type .xlsx having sheet in the filename and having common names in the subdirectories path.
example directory contents:
c:\DATA\a1 info\a1 z information\a1 box\a1 b2 NEW\a1 sheet.xlsx
c:\DATA\a1 info\a2 zx information\a2 box\a2 b2 NEW\a2 sheet.xlsx
c:\DATA\a1 info\a3 zy information\a3 box\a3 b2 NEW\a3 sheet.xlsx
c:\DATA\a1 task\a1 z task\a1 box\a1 b2 new\sheet.xlsx
c:\DATA\a1 task\a1 z task\a1 box\a1 b2 new\sheet.xlsx
I only want the filenames of the files with the following constraints:
Home directory is c:\DATA
The first subdirectory having info in the name.
The second subdirectory having information in the name
The third subdirectory having box in the name
The fourth subdirectory having NEW
I have tried
File/Directory Wildcard (RegExp) Exclude wildcard Required Include subfolders
C:\DATA\ .*.info\.*.information\.*.box\.*.NEW\.*.sheet.*.xlsx N Y
C:\DATA\ .+info\.*.information\.*.box\.*.NEW\.*.sheet.*.xlsx N Y
C:\DATA\ .*info\.*information\.*box\.*NEW\.*sheet.*.xlsx N Y
I am at a loss.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用上一步中的数据,您应该发送带有这些参数的输入数据,在每行中设置目录并扩展:
示例
和转换如下:
转换
配置步骤:
配置
和结果:
结果
我认为这对你有用
Using data from previous step, you should send input data with those parameters, in each row set the directory and exten:
EXAMPLE
And transformation like this:
Transformation
Configuration step:
Config
And results:
Results
I think that works for you