Hi all,
I have a script that I use to delete files with a certain file extension in a folder and its subfolders. I would like to enhance to the script by counting the total number of files and their combined size in MB that the script is deleting and use this information in a popup where a message will say something like "X No. Files deleted totalling YMB
The existing script so far is:
get-childitem -include *.****.rfa -recurse | foreach ($_) {remove-item $_.fullname}
Can any advise what I need to add as I'm quite new to powershell.
Thanks