Computing.Net > Forums > Disk Operating System > DOS Commands

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.

DOS Commands

Reply to Message Icon

Name: Database
Date: August 2, 2009 at 08:58:07 Pacific
OS: Windows XP
Product: Microsoft xp professional / Dos
Subcategory: General
Comment:

Complicated DOS Commands w/ Subdirectories
Are you looking for a way to rename files in subdirectories?

1) Navigate to the folder that contains the subfolders, using Windows Explorer. Copy the address line to your clipboard.
2) Open a DOS prompt. Enter "CD " and then right click (to paste)
3) Do a directory search, "DIR"
4) Highlight the folder names by holding down the left click of the mouse, positioning the cursor at the first letter of the first folder, holding the click, and then dragging to highlight all the desired folder names. Be sure to highlight the entire name of all folders with the highlighted square that's created. Press the [Enter] key to copy the highlighted contents to your clipboard.
5) Open MS Word, Press the [Enter] key once, then paste the contents of clipboard ([CTRL] + "C")
6) Do copy and replace ([CTRL] + "H"), and replace "^p" with "^pCD " ("^p" is the <carriage-return. + <line-feed.)
7) Clear the empty space at the top of the page (that was created when you pressed the [Enter] key)
8) Do copy and replace again, this time replacing "^p" with ^prename *.OldExtension *.NewExtension^p (replace "OldExtension" with desired extension name to change, and "NewExtension" with desired new name)
9) Select all ([CTRL] + "A"), and copy to clipboard ([CTRL] + "C")
10) Go back to the opend DOS prompt from earlier, and paste clipboard contents (right click), then press [Enter]

WHOLA!!!! Magic, all files within subdirectories are renamed!



Sponsored Link
Ads by Google

Response Number 1
Name: MWCC
Date: August 2, 2009 at 10:05:50 Pacific
Reply:

Very good but Windows XP has NT Command Prompt not MS-DOS, surely this should mof been posted in the Programming Forum ??


0

Response Number 2
Name: DAVEINCAPS
Date: August 2, 2009 at 13:02:50 Pacific
Reply:

So if I understand it, your procedure changes the file extensions of all the files with the same extension in multiple directories but doesn't actually change the file name? Or am I missing something?


0

Response Number 3
Name: Database
Date: August 2, 2009 at 18:05:58 Pacific
Reply:

It can be modified to suite the needs at hand. It's just a method that I make use of to manage some situations.

It works in any Windows environment. My test platform for this post was within Windows XP.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: DOS Commands

dos command problem www.computing.net/answers/dos/dos-command-problem/9027.html

using dos commands in a c program www.computing.net/answers/dos/using-dos-commands-in-a-c-program/10581.html

DOS Commands www.computing.net/answers/dos/dos-commands/12692.html