Power shell script to automatically run when timstamp of a file changes

I have a power shell script.
it zips a file and send it across.
i want my script to automatically perform this step when time stamp of that file gets updated.
can i do it with help of a trigger or something.
*this is urgent and suggestions will be highly appreciated.

Welcome to the forum. :wave:t3:

At first Iā€™d like to comment on that:

On stackoverflow there is an answer that applies actually to all peer to peer forums where you expect others to voluntarily help you with your challenges. Please read it carefully.

You could use either a recurring scheduled task running every few minutes and check the time stamp or you may use a FileSystemWatcher.

1 Like