Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have to rename multiple files.
original file name:
os_work_465.jpg to os_comp_465.rtf
os_work_466.jpg to os_comp_466.rtf.and so on.
In short I have to replace work by comp and *.jpg or *.pdf extensions to *.rtf.
No if i get file such as - abc.jpg or abc.pdf then i have to rename as abc.rtfThere are about 50 folders having 10 subfolders each for renaming.
Please tell me how I have to do?? Using simple Batch file or any software

It's anybody's guess why you'd change file extensioms. But those are *NOT* DOS filenames.
=====================================
If at first you don't succeed, you're about average.M2

i will tell you how to do it by a batch file.....
type the following code in a batch file....===
@echo off
ren *.jpg *.rtf
ren *.pdf *.rtf===
Now Copy this bat file to each folders you want to rename *.jpg *.pdf files to *.rtf........

That only works in his example of abc.jpg or abc.pdf to abc.rtf. You're not paying attention to what he wants to do. The other files would be handled like this:
ren os_work_???.jpg os_comp_???.rtf
ren os_work_???.pdf os_comp_???.rtfand that assumes the file names all had 3 characters replacing the ??? wildcards.
And did you notice he had 50 folders, each with 10 subfolders? That's a total of 500 folders. And you expect him to copy his batch file to each of those?
That's why we suggested bulk renaming utilities.

"DAVEINCAPS"......But it will rename
os_work_XXX.jpg to os_comp_XXX.rtf
just i dont know script for doing it in all folders......
but really i tried.......on creating a file os_work_XXX.jpg....
it was converted man.....that bat file really works......just try...=============
hAnSuM KrIsHnA
-a bLACK hAT hACKER
'N'
-a pRO cRACKER
...........................

No, it won't work. YOU try it. How does the REN command in your batch file know to replace WORK with COMP in the file names?
If you do ren *.jpg *.rtf on OS_WORK_465.jpg you get OS_WORK_465.RTF not OS_COMP_465.RTF. The file name replaced by * in ren *.jpg *.rtf doesn't change. The only thing that changes is all the jpg extensions become rtf.
You need to think before you hit the 'submit follow up' button.

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

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