Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Modifying script from HSG blog post and loop it.

$
0
0

Hey guys,

I am a scripting noob but I am having a ball learning Powershell to get it to do all the things I want it to do.

I have found the script from this blogpost "Use PowerShell to Monitor for the Creation of New Files" will do part of what I want but I am having some trouble that requires some assistance.

I would like to modify the script so that when a new file is created I can pass the file path that is returned by it, to rename the newly created file with a timestamp and make the file read only. Then I would like to restart the monitoring ad infinitum.

So where I am stuck is trying to convert the output from the file monitoring to something that I can use as well as making the loop.

If you can resist the urge to feed me a fish and just give me a point in the right direction instead I would prefer it. Otherwise I wont have learned as much and I need to keep asking your for fish, if you get what I'm saying. :)

Cheers.



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>