Can someone please explain to me how to use the rename command to replace part of a file name?
We have a lot of pdf files named something like "12 34 232 0100 0000 XX – APPROVED". When there is a new revision, we have to changed the pdf name from approved to superseded, so it should say "12 34 232 0100 0000 XX – SUPERSEDED". When there are a lot of files that need to be changed from approved to superseded at once, I thought the rename command could help me do it quickly, but it's not working for me.
I went to the command window, and directed it to the folder I had my files in. When I put “ren *APPROVED.pdf *SUPERSEDED.pdf” then the name changed from “12 34 232 0100 0000 XX – APPROVED” to “12 34 232 0100 0000 XX – APPROVED.pdfSUPERSEDED”. Same thing happened when I put “ren *APPROVED*.pdf *SUPERSEDED*.pdf”.
Since that wasn't working, I thought I would test the command and try to change the part of the file name 232 to ABC, so I put “ren *232*.pdf *ABC*.pdf”, and the names go from “12 34 232 0100 0000 XX – APPROVED” to “12 34 232 0100 0000 XX – ABCroved”, so now I really don't know what's going on.
If someone could explain what I'm doing wrong and how to do it right I'd appreciate it.
We have a lot of pdf files named something like "12 34 232 0100 0000 XX – APPROVED". When there is a new revision, we have to changed the pdf name from approved to superseded, so it should say "12 34 232 0100 0000 XX – SUPERSEDED". When there are a lot of files that need to be changed from approved to superseded at once, I thought the rename command could help me do it quickly, but it's not working for me.
I went to the command window, and directed it to the folder I had my files in. When I put “ren *APPROVED.pdf *SUPERSEDED.pdf” then the name changed from “12 34 232 0100 0000 XX – APPROVED” to “12 34 232 0100 0000 XX – APPROVED.pdfSUPERSEDED”. Same thing happened when I put “ren *APPROVED*.pdf *SUPERSEDED*.pdf”.
Since that wasn't working, I thought I would test the command and try to change the part of the file name 232 to ABC, so I put “ren *232*.pdf *ABC*.pdf”, and the names go from “12 34 232 0100 0000 XX – APPROVED” to “12 34 232 0100 0000 XX – ABCroved”, so now I really don't know what's going on.
If someone could explain what I'm doing wrong and how to do it right I'd appreciate it.