Tmp file extensions

I’m a little new to PowerShell and I’m having a problem getting started with this issue. I have a user who has a folder loaded with files of assorted types and all those files somehow got renamed to things like File.docx~RFe3fced.TMP. I need to create a script that collects all these files and then strips off everything after the ~. Any ideas?

Corey,
Welcome to the forum. :wave:t4:

If this is a one time task you should use a multi rename tool instead of a script. Tools like this are included in file manager like FreeCommander, DoubleCommander or TotalCommander or are available as separate tools like Bulk Rename Utility or Advanced Renamer.

Are you sure that is not the result of Ransomware in some way shape or form? If you rename one of them back, does it open?

1 Like