Office Watch

Office 2013

Office Mobile / iPad

Office 2010

Office 2007

Office 2003

Office XP

Office for Mere Mortals

Access

Email

Buying Office

Office 365

Winks

Office News Wire

Join us!

Our Ebooks

Mobile | PDA

RSS


Search

Command Finder


Microsoft Office Bookshop

About

Home




Get folder / file list into Word or Excel

How to get a list of files in a folder into Microsoft Word.

View this page on the new Office-Watch.com web site - click here

by Office Watch

Bookmark and Share

  | Mobile | click for more article services     


View this page on the new Office-Watch.com web site - click here

As long as there have been word processors, we’ve seen the question of how to get a list of files into a document. It should be simple bit it isn’t. Here’s how …

You could write or get a Word macro to do the job but that’s a lot of work and not necessary.

It’s better to find a third-party utility to do the job. Most utilities offer to print the list, but we’re looking for one with a ‘copy to clipboard’ option so you can paste the results into Word or Excel. ‘Save to disk’ is OK but requires an extra few steps that the clipboard option avoids. It’s best if the list is configurable and in a table.

Microsoft’s “solution” is a batch file which takes the DOS dir command output and redirects it to a printer port. Seriously … that’s Redmond’s only solution even for Windows 7! Forget it.

There are many folder listing utilities out there; some readers might have their favorite.

We looked at many and discarded most for one reason or another. Many had no ‘clipboard’ option while others provided few formatting options. Some others had great looking formatting but not a plain table listing that could be pasted into Word or Excel for a user to do their own formatting. A few would not work on, now more common, 64-bit Windows.

Our choice came down to Directory List and Print which has plenty of options with a preview window so you can see how your choices affect the result. In this example we’ve chosen the path in a separate column plus the file size.

Directory list and print - Selection pane image from Get folder / file list into Word or Excel at Office-Watch.com

The grayed selections are only available to registered users – US$20 or €15. The list can also be manually edited in the preview pane.

You can print the list or export to Word or Excel documents however most useful is the explicit copy to clipboard option on the Output tab.

Directory list and print - Output pane image from Get folder / file list into Word or Excel at Office-Watch.com

Click on ‘Copy to clipboard’ then paste into Word or Excel.

In Word, the list will appear with a paragraph for each file and tabs to separate the columns. Use the ‘Show All’ button to see the formatting marks.

Directory list and print - Word raw output image from Get folder / file list into Word or Excel at Office-Watch.com

If you wish to make a table list, select the entire pasted list and choose Insert | Table | ‘Convert text to table’. With a table you can sort and rearrange the columns.

In Excel it’s easier. Excel sees the incoming tab separated content and puts it into individual cells automatically. It also strips the leading spaces from the numbers.

To make some changes, like reformatting the date or file size fields, paste into Excel and use it to make the changes you want eg commas in file size numbers. Then copy the results from Excel into whatever program you like.

Directory List and Print isn’t perfect but it’s the closest solution we’ve found. It’s a pity the program can’t handle network paths, you have to map a drive letter to get a list from a network share.


Reader Denise S. suggest a variant on the Microsoft solution.  Open a 'DOS' command box and redirect the folder contents list to a file  eg:

dir > file.txt

 

Then open the file and copy the contents.  An alternative is to do a DIR then select the output on the screen, copy and paste it into the place you want.

 

This works but you don't get the flexibility of selecting columns, including sub-folders etc that a separate tool provides.  It's worth keeping the 'DOS box' options in mind as a fallback position.

Article posted: Monday, 09 January 2012

View this page on the new Office-Watch.com web site - click here

there's more ...

If you liked this article you'll LOVE our new ebooks.

Office 2013: the real startup guide

OFFICE 2013: the real startup guide Everything you need to know about Office 2013 but Microsoft won't tell you.

How to save money, install, configure and use the new features in Office 2013.  Get it today - click here.

Windows 8 for Microsoft Office users

Windows 8 for Microsoft Office users A practical guide the new, changed and unfamiliar in Windows 8

A focused and unvarnished look at Windows 8, especially written for the many people who use Microsoft Office  Get it today - click here.

ORGANIZING OUTLOOK EMAIL - tame your Outlook 2010 Inbox

100+ pages of practical tips and help to streamline, automate and search your Inbox.  Get more than you ever thought possible from Outlook.  Read it today - click here.



Article Services sponsored by: Office Watch Ebooks - available now to download and read today.
RSS feed for this category Subscribe

Translate | Mobile | Links
 Add to: Bookmarks | | DiggThis | Yahoo! My Web


New & Popular
» New Office-Watch.com web site
» Two ways for sorting by Number
» Office for iPad, September updates
» Why is Gene Cernan ignored in Word?
» DropBox prices drop but is it enough?
» Sort by hidden column in Word


Office Watch, Office for Mere Mortals, Access Watch and all titles used within the publications are Copyright © 1996-2014 Office Watch.
Microsoft Office, Microsoft Word, Microsoft Excel, Microsoft Outlook, Microsoft Powerpoint and doubtless many other names are registered trademarks of Microsoft Corporation.

Search  |  Sitemap |  Popular Topics | Privacy Statement |  Advertising |  Twitter |  Feedback / Contact Us
Office Watch is definitely not affiliated with Microsoft - and that's just one reason why we are so useful to Microsoft Office users around the world J (Erko).