Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi people. I'm a bit new to fiddling around with DOS so bear with me if this question seems somewhat sophomoric.
I'm trying to rename a group of files from a series of folders with the name of the folder 2 levels above them and something determined by part of the original file name.
In the directory C:\A\Z\ and C:\B\Y\ I would like to rename C:\A\Z\1a_b.txt and C:\B\Y\1a_b.txt respectively, but would like to leave C:\A\Z\1c_b.txt alone (i.e. Ideally I would be able to rename all *a_b.txt files in multiple folders in the following way):
The first file C:\A\Z\1a_b.txt --> C:\A\Z\Aroads.txt (the A is from the directory 2 levels above it, and the "roads" always replaces "a_b").
The second file C:\B\Y\1a_b.txt --> C:\B\Y\Broads.txt.
Repeat 15,377 times in 400 folders from C:\C\A\ to C:\ZZZZ\R\. Confusing enough for you? Hope someone out there can help.
If it makes things easier, I can make a dir list of all files named *a_b.txt and use that list to provide the pathname for those files when renaming them.
Thanks in advance!
jakapoor

I don't know the answer to your question, but you are not using "DOS."
You are using a "command prompt", or a "command line"
There IS no "DOS" in X tra P utrid

There is no MS-DOS in XP !!
Could try Command Prompt I think you should have that, ie START - RUN - CMD ........
http://www.ss64.com/nt/
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx

Sorry for the confusion. Yes I mean a command prompt, not DOS. But my problem still remains. Any suggestions?
Thanks.
jakapoor

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |