I want to use the Rename (ren) command in a batch file, to rename four files of the same name, that are located in four different directories, throughout Windows. Unlike several other DOS commands, REN does not allow for the /s switch, which would allow it to do it's work in many sub directories.
So my question: Is there some way, in DOS batch file language, where I can first run the DIR (Directory) command to find the location of the four files that I want to rename, and then send that info to the REN command, to rename those four files?
It's been too many years, since I've written anything but the most basic Batch Files, and I'm suffering from the "Use it or loose it" syndrome.
In the instance that I've eluded to above, I could possibly write a four line batch file, to rename the four program files, however, two of the paths are so long they would run off of the side of the CMD box. It would be great, if I could just write a one-liner to do the whole job.
Any and all help would be greatly appreciated.
Thank You,
TechnoMage
So my question: Is there some way, in DOS batch file language, where I can first run the DIR (Directory) command to find the location of the four files that I want to rename, and then send that info to the REN command, to rename those four files?
It's been too many years, since I've written anything but the most basic Batch Files, and I'm suffering from the "Use it or loose it" syndrome.
In the instance that I've eluded to above, I could possibly write a four line batch file, to rename the four program files, however, two of the paths are so long they would run off of the side of the CMD box. It would be great, if I could just write a one-liner to do the whole job.
Any and all help would be greatly appreciated.
Thank You,
TechnoMage
