Created
July 6, 2021 03:27
-
-
Save rosshiga/c0291721e00ad9c8868228db23113bf3 to your computer and use it in GitHub Desktop.
Powershell Watch Folder Trigger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Waits for CSOR App to push a text file to directory then runs BR Data SQL export | |
| while( $true ) | |
| { | |
| if( (Get-ChildItem C:\Brdata\CSHOST\auto\*.txt | Measure-Object).Count -eq 1){ | |
| Start-Process -FilePath "C:\Brdata\plbwin.exe" -ArgumentList "brsqlexp autocmd numdays=5 DSDDET DSDHDR" | |
| } | |
| Remove-Item 'C:\Brdata\CSHOST\auto\*' -Include *.txt | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment