简体   繁体   English

用于从文件夹中获取最新文件的 Blue Prism 表达式

[英]Blue Prism expression to get most recent file from folder

I am trying to write an expression on putting an attachment in the Outlook VBO and keep getting error that it cant find the file.我正在尝试编写一个关于将附件放入 Outlook VBO 的表达式,并不断收到无法找到该文件的错误。

The file name is Investment Value_2022-12-13h12m37s45.xlsx bit everything after value will be different.文件名为 Investment Value_2022-12-13h12m37s45.xlsx 位值之后的所有内容都会不同。

I have tried writing it as a wild card.我试过把它写成通配符。 "C:\Users\AAPWP\Downloads\Investment*" “C:\Users\AAPWP\Downloads\Investment*”

I tried filtering it into its own collection and getting it that way.我尝试将其过滤到自己的集合中并以这种方式获取它。

"File.File" “文件.文件”

Trying to get the file path from a filtered collection.尝试从过滤的集合中获取文件路径。

"Attachment.Folder.Name" “附件.文件夹.名称”

Anybody having the same issue and any help would be appreciated.任何有同样问题的人和任何帮助将不胜感激。

  1. Use 'Utility - File Mangement: Get Files' action to get all excel files使用“实用程序 - 文件管理:获取文件”操作获取所有 excel 个文件
  2. Loop through each file name and use 'Decision' action to check for file name pattern遍历每个文件名并使用“决策”操作来检查文件名模式
  3. Use formula - InStr([Files.Name], "Investment Value_") > 0使用公式 - InStr([Files.Name], "Investment Value_") > 0
  4. If True, then thats the file you need如果为真,那么这就是您需要的文件

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM