Computing.Net > Forums > Windows XP > rename file w folder above it (DOS)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

rename file w folder above it (DOS)

Reply to Message Icon

Name: jakapoor
Date: September 29, 2005 at 09:06:57 Pacific
OS: Windows XP pro
CPU/Ram: Intel Pentium M 1.86/ 2GB
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: name
Date: September 29, 2005 at 09:15:14 Pacific
Reply:

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


0

Response Number 2
Name: plainandsimple
Date: September 29, 2005 at 10:24:44 Pacific
Reply:

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


0

Response Number 3
Name: jakapoor
Date: September 29, 2005 at 11:01:53 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: rename file w folder above it (DOS)

LastGood.Tmp folder-what is it? www.computing.net/answers/windows-xp/lastgoodtmp-folderwhat-is-it/28506.html

Temp files and folders delete O.K? www.computing.net/answers/windows-xp/temp-files-and-folders-delete-ok/99554.html

Cannot remove folder _: NEW Error? www.computing.net/answers/windows-xp/cannot-remove-folder-new-error/133194.html