|Hello, I'm working on a batch file that is supposed to clean up a large folder of files based on certain criteria. My problem is that all the filenames have both spaces and equal signs in them. E.g.: |
0001 - Sent (MsgNo=123456, MsgT=AB-C, MsgLayout=MM).xml
I've got my batch script working to the point where it will delete what it's supposed to delete if the filenames are in the proper format, but I can't figure out how to rename (with a batch script) the filenames to either delete the = and space characters or better yet replace them with something acceptable, like _.
I know there are free utilities out there that will do it for you, but the issue with those is that the batch script is supposed to run as a periodically scheduled task without any user input, and most of what I found uses a GUI to prompt the user to select the desired inputs/actions--so I can't use that.
Does anyone know how to code this?