Skip to main content
Question

How to Get the Dropped/Added File Information While Using Directory Watch in Automation


bhk
Contributor
Forum|alt.badge.img+3
  • Contributor

Using FME Server FME Server 2021.1 (Build 21607 - win64) I have created a Directory Watch automation to send an email if any new file added into the Directory

 

Which is working as expected but can some one please let me know how I can grab information like File name and SIZE and time and send it to by the email. 

4 replies

lifalin2016
Contributor
Forum|alt.badge.img+29
  • Contributor
  • August 6, 2024

The ‘file action’, ‘file path’ and ‘file root name’ are transferred as part of the success message from the DirectoryWatch (under Directory).

You will however need a small workspace to find and output the file size (if file was added or updated).

Using FME Server 2022.2 myself.


bhk
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • August 8, 2024

Hi lifalin2016
Thanks for your comment. Is it possible for you to share some images of your script? how should I output the The ‘file action’, ‘file path’ and ‘file root name’ on any  workspace  like excel sheet?

Thanks


mattmatsafe
Safer
Forum|alt.badge.img+10
  • Safer
  • August 13, 2024

@bhk 

Try using a directory and file pathname reader and passing the values back the Automation using an Automation Writer.

Please see image below. 

Hope this helps. 

 


lifalin2016
Contributor
Forum|alt.badge.img+29
  • Contributor
  • August 14, 2024

Shown is a small demo workspace with a single published parameter (e.g. Filename Existing) named FILEPATH. In the automation you pass the Directory/File Path to the workspace parameter:

Then e.g. use a PythonCaller in the workspace to find the file size:

Hope this helps.

Cheers
Lars I


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings