While Outlook holds several exporting options for messages, it does not have an option to export a list of folder names. A common workaround suggested is to use screenshots instead. This (an image) is often not a very practical output format.
Oct 11, 2012 Open the folder you want to get a content listing of and hit Command+A (Select All) followed by Command+C (Copy) Now launch TextEdit and pull down the “Edit” menu and select “Paste and Match Style”, or hit Command+Option+Shift+V Save the directory listing as either a.txt or.rtf Saving a Detailed List of Files from Terminal. Thanks for the quick response but I like the format that -recursive provides so I have one line for each folder and subfolder combination that can be exported to a file. This Get-ChildItem c:windows.directory does provide the results but would be too difficult to work with in a file.
Even though several screenshot applications also have text recognition and can export the contents to a text file, it usually still is cumbersome. While the end-result will improve, it often isn’t very workable when you have long folder names or a deep rooted system as the names might get truncated in the windows you are taking a screenshot of.
Feb 05, 2017 Here's how you can convert the names of files or folders listing into text while using Windows 10; Select files or folders you wish to copy filenames. Next press 'Shift' button on your keyboard and Right-Click through your mouse.
A much more direct solution would be to use a script to generate the txt-file by querying Outlook for the folder names itself. This guide provides 2 methods to do that; via a VBScript file that can run outside of Outlook (quickest method) and by using a macro.
VBS script: Quickest method to export the folder names
If you just want to get your export as quickly as possible use the instructions below;
- Download this code-file (
exportoutlookfolders.zip
) - Open or extract the zip-file and double click on
ExportOutlookFolders.vbs
- Select the mailbox or folder you want to export the folder names of.
- Select whether you want to structure the output or not (see the example screenshots below).
- Within a few seconds the file
outlookfolders.txt
will appear on your Desktop containing the exported folder names.
You’re done! When you want to use the script from within Outlook instead; feel free to continue reading ;-).
Note:
When you run ExportOutlookFolders.vbs
again, your new results will be appended to the outlookfolders.txt
file.
ExportFolderNames VBA macro
The ExportFolderNames macro allows you to export all folder names starting from the currently selected folder.
When executing the macro, you’ll be prompted whether or not you want to structure the output.
Export Folder Structure To Text File Converter
- No structuring (Default)
If you choose “No” (default), the output will list all the folder names with their folder path in full. - Structuring
If you choose “Yes”, only the folder names will be exported. A hyphen character “-” will be placed in front of the folder name to indicate when a folder is a sub folder. A folder that is for instance rooted 3 levels deep when compared to the start folder will have 3 hyphen characters in front of it.
The module also contains a macro called ExportFolderNamesSelect. This macro does exactly the same as the ExportFolderNames with the exception that it will prompt you to select a starting folder. This is mainly to accommodate for exporting folder lists of an entire IMAP mailbox store when using Outlook 2010 (as you can’t select the root folder in that version of Outlook).
Output Examples
Unstructured output. | Structured output. |
Quick Install
Use the following instructions to configure the macro in Outlook;
- Download this code-file (
exportoutlookfolders.zip
) or copy the code below. - Open the VBA Editor (keyboard shortcut ALT+F11)
- Extract the zip-file and import the
ExportFolders.bas
file via File-> Import…
If you copied the code paste it into a new module. - Sign your code so you won’t get any security prompts and the macro won’t get disabled.
- Add a button for easy access to the macro or press ALT+F8 and select the macro you want to execute.
Add a button of the macro to the QAT for quick access to it.
Macro Code
The following code is contained in the zip-file referenced in the Quick Install. You can use the code below for review or manual installation.
How do I copy a list of file names into Excel?
If this is the same question popping in your mind, then you are at the right place.
Also Read: How to Enable Text to Speech On Windows 10.
From the last 2-3 years, I have started backing up my computer files to some external hard drives. To prevent data loss.
And till now I have filled 4-5 hard drives of data.
But it’s really difficult to remember which files are present in which hard drive.
So I started exporting all files names to excel files & keep a record of it.
But it was hell time-consuming. And then I got to know about this trick method of copying filenames from folder in windows explorer.
Let see How it works…
Copy File Names Into Excel From Folder
This method of creating a list of the contents of a folder as text has helped me a lot in saving my time. Whether they are too long, short or one word it works with all.
Moreover, you can also create a directory of files present in a folder.
So let’s get started.
1. Open Windows Explorer
Open Windows Explorer and navigate to your favorite folder for which you want to create a list of filenames as text.
2. Copy File Names as Text from folder
Now select only those files for which you want to copy file names into excel from the folder.
Now, Press Shift key + Right Click on it. And then select Copy as path Option.
File List Export
And you have successfully copied files as text and also its location with the file extension.
3. Export Filenames to Excel
Now it turns to export filenames to excel file in windows 10. So, Open your Excel sheet and Press Ctrl+V to paste it properly.
And you can also copy filenames to Notepad as text using this technique.
That’s it for now…
Conclusion
So that’s how you can easily get a list of all files in a folder and subfolders into excel. And you can also follow the same method for Windows 7/8.
Check out the next post on how to copy filenames to excel using cmd.
Feel free to share your thoughts and also tell us if you know any better way to Export or Copy File Names Into Excel From Folder in Windows 10.
If you liked this post, Don’t forget to share this post.