I have a windows file system where a hiccup in our backup software renamed hundreds of files.
The change looks like this:
"ABC.PDF" -> "ABC.PDF.BAK"
This happened to some, but not all files in a directory.
I would like to rename such files to their old name, but the script should output or ignore cases where this is not possible, because a "ABC.PDF" already exists.
I am not familiar at all with batch scripts, but powershell is available too.