renaming word files

S

s

I have 1000 word documents named PersonFirstNameLastName1.doc,
PersonFirstNameLastName2.doc, PersonFirstNameLastName3.doc ...
PersonFirstNameLastName1000.doc

Now, I have to rename them to Document1.doc,
Document2.doc...Document1000.doc respectively

Is there a way I can do it? If so, what are they? Do some renaming
utilities exist which does that or do I need to do some sort of
scripting to achieve that?

Can someone please advise?

Thanks
 
D

Doug Robbins - Word MVP

s said:
I have 1000 word documents named PersonFirstNameLastName1.doc,
PersonFirstNameLastName2.doc, PersonFirstNameLastName3.doc ...
PersonFirstNameLastName1000.doc

Now, I have to rename them to Document1.doc,
Document2.doc...Document1000.doc respectively

Is there a way I can do it? If so, what are they? Do some renaming
utilities exist which does that or do I need to do some sort of
scripting to achieve that?

Can someone please advise?

Thanks
That does not sound like a very useful way to name the documents. How
would you know what Document253 was?

However, you could modify the code in the the article "Find & ReplaceAll
on a batch of documents in the same folder” at:

http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

by taking out all of the stuff about replacing the text and just have it
open each document as save it with a new name that was created by having
a counter that incremented by one for each document and combining the
current value of the counter with the word "Document"




--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my
services on a paid professional basis.
 
G

Graham Mayor

Are the files named *exactly* as you have shown them or are they named with
the names of the persons eg GrahamMayor1.doc DougRobbins2.doc etc?

As Doug indicates it would be possible to use a batch process to rename
files, but if they are named as you have indicated
http://www.bulkrenameutility.co.uk/Main_Intro.php is by far the simplest way
to rename the files (and infinitely faster than using a Word macro to do
so).

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

s

That does not sound like a very useful way to name the documents.  How
would you know what Document253 was?
That is the idea. We want the documents to be anonymous
as they are part of a survey where we don't want the participants
to be identified.
However, you could modify the code in the the article "Find & ReplaceAll
on a batch of documents in the same folder” at:

http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

by taking out all of the stuff about replacing the text and just have it
open each document as save it with a new name that was created by having
a counter that incremented by one for each document and combining the
current value of the counter with the word "Document"

Yes, it helps a lot. Thanks a lot
for your help and advice.
 
S

s

Are the files named *exactly* as you have shown them or are they named with
the names of the persons eg GrahamMayor1.doc DougRobbins2.doc etc?

As Doug indicates it would be possible to use a batch process to rename
files, but if they are named as you have indicatedhttp://www.bulkrenameutility.co.uk/Main_Intro.phpis by far the simplest way
to rename the files (and infinitely faster than using a Word macro to do
so).
They are named as I indicated excluding few of them. Thanks for
the link and your reply. I appreciate that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top