How do you change file extensions for all files in a directory?

Find, replace, find in files, replace in files, regular expressions

How do you change file extensions for all files in a directory?

Postby CrgEugene » Sun Jan 06, 2013 5:06 am

Hi. How do you change file extensions for all files in a directory?
For Directory D:\_Data\*.doc I want to change all the files to Directory D:\_Data\*.rtf.

Thanks for your help.

Craig
CrgEugene
Newbie
 
Posts: 1
Joined: Sun Jan 06, 2013 5:02 am

Re: How do you change file extensions for all files in a directory?

Postby Mofi » Sun Jan 06, 2013 11:09 am

Why do you ask that in the forum of a text editor?

It is quite simple to rename all *.doc files in a directory to *.rtf. Just run in a command line window or via Run in Windows start menu the DOS command

ren D:\_Data\*.doc *.rtf

That's it.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3936
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Find/Replace/Regular Expressions

cron