I need a PowerShell to look for new files when a new file enters. A notification Should be sent out an email with the name of the new files.
What have you tried already.
Put your code sample and describe / show the issues you any or may not be having. It is there where we can assist.
If you had not done that yet, just use your search engine of choice and use the sting ‘powershell monitor files and folders’
You’ll get several hits leading to examples on how to do what you are asking.
For example:
Powershell FileSystemWatcher
This script uses the .net FileSystemWatcher class to subscribe to ‘create’, ‘change’ and ‘delete’ events on files or folders in the NTFS filesystem.It can be used to monitor a folder or folders, and can be modified to perform any action upon the triggering of these events.
Please check out the following links for more help:
Use PowerShell to Monitor for the Creation of New Files
Watch a folder constantly for new files
https://stackoverflow.com/questions/11552059/watch-a-folder-constantly-for-new-files