How To Copy Filenames From Explorer Or Window Controls

The free portable utility GetWindowText makes it easy to copy filenames from Explorer into Excel or Word etc – to save, sort or print out for a permanent record.

There are several other ways to print a directory in Windows – Microsoft offer an automated Fix It to add the Print Directory feature for folders but GetWindowText can do so much more and is portable.

It can copy not only directory trees and list views but also the text from Windows controls, error logs and static windows etc.

GetWindowsText is a tiny and free portable program that works on Windows 7 and 8, Vista and XP. It supports directory trees and folder/file list views to read the entire contents. It can also read texts from Windows Edit, Static, Groupbox, Combobox and Controls etc.

Download the program from the developer here – it’s available in 32bit or 64bit versions. Extract the zip file to reveal the GetWindowText.exe program – copy this to your desktop or elsewhere if you want to make it easier to find.

Run GetWindowText.exe to open the program:


As the instructions say – click on the icon with the left mouse button, then press and hold down (drag and drop) it over the window or element which contains the text to be read.

As you move over each element (e.g. directory tree or list view) they are highlighted within a rectangular box so it is easy to see which element is currently selected – the text within the element also appears in the main GetWindowText window.

Release the left mouse button when you have selected the correct element and the text remains in the main program window. You can now copy and paste the text into Excel or Word etc to sort, save or print as required.

Program Options

The program options are self-explanatory:


The most useful option (not selected by default) is likely to be ‘Read all columns from the list view’. Select this if you want the text of the list view (folders and files) to include the details of the files and folders e.g. file size, type, date modified etc.

Tech Notes

The program is portable (no need to install) and settings are saved in a .ini file.

If you choose to autorun GetWindowView (start with Windows) it places an entry in the registry at the usual startup location (Windows\Current Version\Run) – you can see this using Msconfig.

To ‘uninstall’ the program, first ensure it is set to not start with Windows, then just delete the GetWindowText.exe program file (and the .ini file if you want to be thorough).


The program’s website doesn’t make it very clear what the program actually does – a casual reader might even get the impression that it somehow reads aloud text that you select…

In fact it is a simple but highly effective way to copy filenames from Explorer into Excel or another application – and it is also able to copy Control (and other) Windows text that is not usually able to be selected or copied.