I have a folder on a Windows Server full of DLL's that get created nightly. Sometimes something goes wrong with the nightly job and instead of the DLL's being overwritten with new versions, the new version gets created as a versioned file with a (1) suffixed in the last part of the filename. E.g. "apple.dll" now gets a duplicate file of "apple (1).dll".
How do a rename all files in this folder using the Windows command "ren" and wildcards to drop the " (1)" part of the filename? I've already deleted all the old files without the 1 attached as those I could isolate by date modified in Windows Explorer.
I've tried "ren *(1).dll *.dll" but nothing happens. Tried similer in Power Shell but just get this error: "Cannot process argument because the value of argument "path" is not valid. Change the value of the "path"."
If the Windows command "rename" nor the Power Shell rename-item commandlet can't do this, I'm open to other suggestions.
Thanks in advance