Link to home
Start Free TrialLog in
Avatar of Terry N
Terry N

asked on

I need to remove extension .networkmaze from end of file names en mass

I am desperate need of a script or program to remove the modified extension from a ton of files on an x-ray server that got hit with a wanna be ransomware.  Fortunately it just added a .networkhaze on the back end of the file extension I used Kapersky Disk Save to remove the virus and was lucky enough to try renaming a bunch of different files back to normal and it works.  The files are still in tact but they are on C: drive and D: all over the place...  Its midnight, I've been at work 18 hrs and could use an assist.  Anyone?
Avatar of ste5an
ste5an
Flag of Germany image

So the file integrity checks show, that the content has not changed?

E.g. as PowerShell

Get-ChildItem -Filter '*.networkhaze' -Recurse |
    Rename-Item -NewName {$_.Name -Replace '.networkhaze',''} -WhatIf

Open in new window

It assumes that the string '.networkhaze' is not part of any file name besides the extension.
The -WhatIf does only show what it would rename. To execute the rename, remove it.
There are plenty of free Windows utilities out there, that rename files in bulk.
For example > https://www.advancedrenamer.com/

This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.