Skip to main content

Notify when there is a new file in a folder


Christian Hauggaard
Community Manager
Forum|alt.badge.img+5

The PowerShell Data Provider in TimeXtender Orchestration and Data Quality can be used for various things. In this post, you will create a test in TimeXtender Data Quality, using PowerShell to notify you whenever there is a new file that matches a pattern in a folder.

  1. Create a new Compare Query in TimeXtender Data Quality by right-clicking the Data Quality > Tests folder
  2. In the first query window, choose the PowerShell Data Provider and add the following PowerShell script:
    $path = "C:\temp\Names*.txt"
    
    $timeXtenderResult =  Get-ChildItem $path | Select-Object -Property FullName,CreationTime | exMon-Out-DataTable
  3. In the second query window, choose the Saved Comparative Data Provider and set it to autosave results during each execution.
  4. Map the output columns as normal.
  5. Make sure only DS2 incl. DS1 is selected. That makes sure we are only notified of new files, not removed files.
  6. Configure email settings and schedule as normal.

Example email from the test:

Did this topic help you find an answer to your question?

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