Brand new to Powershell... :)
I'm working on automating some steps that we do that involve renaming a whole bunch of files. I want to code it in so that it can just go through and rename them all, but I need to know if each rename worked or not.
Ideally I'd want to just output something like
Folder Result ------ ------ Folder1 OK Folder2 Error
I don't see that the Rename command actually can return a True/False to say if it worked or not so I figured I can put each Rename-Item into its own Try/Catch and the Catch statement could put in Error and if it didn't have an error I could put in OK somehow.
Just looking for some ideas for how I can make this work and look decent. :)
Thanks!