Gaebler Ventures Gaebler Ventures is a business incubator and holding company providing venture capital investment and shared services to early-stage companies. We've invested in some great portfolio companies. Some of the best resources for entrepreneurs -- all based on our real world experiences! Our guiding investment philosophy is to provide exceptional returns for our investors. Check out the latest news from Gaebler Ventures. Learn more about Gaeber Ventures! Get in touch. We'd love to talk with you!   
 
 
Gaebler Ventures is a business incubator, holding company, and private equity firm. We help entrepreneurs transform ideas and innovations into greatness.

Articles for Entrepreneurs

 

A Way to Rename Multiple Files At Once

 

How to Rename a Bunch of Microsoft Word Docs

Wondering how to rename multiple files quickly and easily? Here's a way to give many files a new name without having to manually rename each file one at a time.

If you need to rename a bunch of Microsoft Word docs, or rename a bunch of files of any type, here's a quick and easy way to do it.
(article continues below)

To give you background on why we are writing this article, you should know that we had written another article on how to merge all the Word docs in a folder into one Word doc.

That macro works fine but a lot of people have complained that is creates a new Word doc that sequences the merged Word docs in order by their alphabetical name.

So, A.doc was above B.doc was on top of C.doc, etc.

But what if you want the order of the docs in the merged file to be C.doc, B.doc, and then A.doc.

Our Merge Word Docs macro doesn't do the job for that scenario.

A brute force way to fix this is to rename the files. For example, in our example above, you might rename C.doc to be 1C.doc, B.doc to be 2B.doc, and C.doc to be 3C.doc.

After doing that, the Merge Word Documents macro would work just fine, right?

But if you've got 50 documents, say, it's a pain to rename all of them one by one.

There are probably a million ways to solve this problem, but here's one way. Be sure to read this entire article before you get started, including the very last note, which identifies a small flaw in this writeup that I didn't have time to address.

Put the names of the documents in a Microsoft Excel spreadsheet in a single column. The order of the documents should be in the order you want the documents to be merged.

So, maybe I have documents with the name A.doc, B.doc,…,M.doc but I want to merge these Word docs using the sequencing below:

Rename Multiple Files

OK, so the first thing you do is put numbers in column B, so it looks like this picture.

Rename Microsoft Word Documents

In other words, you start with 1 and increase by 1 going down. (Side note: A quick way to do it is to type 1 and 2 manually, and then select (highlight) the cells with the 1 and 2 in them. You'll see a small black square in the lower right corner of the two highlighted cells. Put your cursor on that black square and click and drag down. Excel will automatically increment the numbers for you.)

Now go to cell C1 and type this in:

="copy ..\"&A1&" "&B1&A1

Hit enter to complete the entry of this formula. Basically, what you've done is used Excel commands to create a DOS command. If this is new to you, it'll make more sense soon.

Select cell C1 and copy that cell down to all the cells below it that correspond to your document names in Column A. In our simple example, the spreadsheet now looks like this:

How to Rename Many Files At Once

Now, select all of the cells that have the formula in it and then copy paste into a text file. I like to use Notepad to create a new text file. It comes with Windows and is usually in your Accessories folder off Program Files from the Start Menu.

Here's a quick pick of my new text file.

DOS Copy Commands to Rename Files

Now, you are going to save this text file as Rename.bat, but first read the instructions below very carefully.

When you do your File > Save As, make sure that you save this file in a new folder (i.e. a new directory) that is inside of the folder that contains all your Word docs that you want to merge. You can call that new folder whatever you want.

So, just to reiterate, you've now got a folder that contains all your Word docs and inside of that folder, along with all those Word docs, is a subfolder that contains this text file that is called Rename.bat (not rename.bat.txt, just rename.bat).

What you've done so far is to create a DOS batch file that has several instructions to go up one directory in the folder hierarchy and copy a Word doc to a Word doc with a different and new name.

To execute rename.bat, the DOS batch file, just drill down to the directory that contains rename.bat and double click on rename.bat.

The DOS commands will run and, within a short time, you will have all your renamed files in the folder that contains rename.bat. At this point, you can delete rename.bat, assuming it's done its job properly.

Now, you are in a good position to run the Merge All Word Documents in a Folder macro.

And, if you got to this page for an entirely different reason, you now know how to rename many documents. This works for all file types of course…not just for MS Word files.

IMPORTANT NOTE OK, I cranked this article out in no time and now I realize that the alpha sorting above would mess up a bit. That's because the alphabetic sequencing would be 10B.doc, 11J.doc, 12E.doc, 13H.doc, 1I.doc, 2F.doc, 3K.doc, 4D.doc, 5C.doc, etc. I don't have time to rewrite the article but the way you fix this is to put a zero in front of the single-digit numbers, so instead of renaming I.doc to 1I.doc, rename it to 01I.doc. Hopefully, you can figure that out on your own. Good luck!

Related Articles

Want to learn more about this topic? If so, you will enjoy these articles:

How to Combine Multiple Word Documents into One Document


Comment Board

Did these instructions on renaming multiple documents help you? Did you run into any problems? Leave a comment below. Thanks.

Alain 6/19/2009

Hi, Thank you for this great tip on renaming Word documents. I used it and it worked. I used it for a whole bunch of files. Today, however, when I went to try it again, it wouldn't work. I used the same folder that has all the files, deleted the old sub-folders and created new ones. I checked the syntax to make there was no typo and everything is OK. Any suggestions?

MRU 11/12/2009

It didn't work for me. I tried it with 40 files. The batch file execute window opens and runs very quickly, so I can't see what's going on. But no new, renamed files appear.



Write a comment  Code Image - Please contact webmaster if you have problems seeing this image code
Problem Viewing Image
Load New Code

If you are an ambitious entrepreneur or an aspiring executive looking to get involved with a startup, please take the time to learn more about Gaebler Ventures.

 

 

Additional Resources for Entrepreneurs

Starting a Business - Business Ideas - Naming and Branding - City Guides

Buying a Business - Writing a Business Plan - Raising Money - Incorporate

Small Business Marketing - Advertising Advice - Public Relations -

Customer Service Tips - Entrepreneurial Selling - Workplace Safety

Startup Leadership - Strategy - Intellectual Property and Entrepreneurs

Articles on Exporting - Human Resources for Entrepreneurs - Workers Comp

Legal Information for Entrepreneurs - Sarbanes-Oxley - Accounting - SBDC

Business Credit Cards - Nonprofit Entrepreneurs - Mission Statements

Tax Tips and Resources for Entrepreneurs - Operating Your Startup Business

Real Estate Decisions for Entrepreneurs - Franchising - Selling a Business

Starting a Home Business - Small Business Technology - Business Travel

Business Finance - Advice for Retailers - Entrepreneurship for Scientists

Administrative Professionals / Office Managers - Family Business Advice

Good Businesses to Start - Start an Energy Business - Start a Hedge Fund

Payroll Service Information - Productivity Tips - Bad Economy Advice

Small Business Websites - Search Engine Optimization - Online Reputation

Search Engine Marketing - Social Marketing Optimization - Business Forms

Business in the Jungle - Business in Fiction - Negotiating - Radio Ad Costs

Newspaper Advertising Rates - City-Specific Resources for Entrepreneurs

Small Business Insurance - Global Entrepreneurship - China & Entrepreneurs

Entrepreneur Features - Employee to Entrepreneur - Small Business Ethics

Acquisition Speculation - Good Business Books - SBA Franchise Loans

Small Business Loans - Studying Entrepreneurship - How Kids Make Money

Social Entrepreneurship - Mergers and Acquisitions -

Veteran Entrepreneurs - Useful Web Sites for Entrepreneurs - Dell Deals

Buy.com Deals - Female Entrepreneurship - Small Business Experts

Entrepreneurial Resources by State - Resources for Young Entrepreneurs

African American Entrepreneurs - Resources for Hispanic Entrepreneurs

Resources for Asian Entrepreneurs - Resources for Women Entrepreneurs

Resources for Gay Entrepreneurs - Businesses for Sale - Office Supplies

Economics - Lists of Small Business Incubators - Lists of Angel Investors

Lists of Venture Capital and Private Equity Firms - Franchise Opportunities

Recommended Products and Services for Entrepreneurs - Contributors

Get FREE Price Quotes from Multiple Vendors - Business Glossary