Computing.Net > Forums > Programming > Batch file rename and move

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.

Batch file rename and move

Reply to Message Icon

Name: jquestion
Date: June 5, 2006 at 09:33:14 Pacific
OS: xp
CPU/Ram: 512
Product: ibm
Comment:

I would like to create a batch file to rename all *.cap files to *.mp3 in a certain directory before moving them all to another directory. I will need to do this for multiple directories, but have them all move files to one central directory, that will have no structure, just the resulting .mp3 files.

For example:

If the file 123.cap was in the c:\test1 directory and the file 456.cap was in c:\test2 directory, I would like both of these files renamed 123.mp3 and 456.mp3 and then moved to c:\test3 (I realize this may have to be done in seperate processes) that will be the central repository for all mp3 files and have no subdirectories.

Thanks for looking at this for me.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: June 5, 2006 at 11:07:20 Pacific
Reply:

for %%N in (1 2) do (
ren c:\test%%N\*.cap *.mp3
move c:\test%%N\*.mp3 c:\test3
)


If at first you don't succeed, you're about average.

M2


0
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 Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file rename and move

batch file rename and move director www.computing.net/answers/programming/batch-file-rename-and-move-director/15414.html

Batch file copy and Rename www.computing.net/answers/programming/batch-file-copy-and-rename/18689.html

Batch file renaming www.computing.net/answers/programming/batch-file-renaming/18676.html