I don’t often need to list files, but when I do need to, it’s annoying to have to go to a Command Prompt, but I worked out a little trick to make it easier. Here it is:-
Open Notepad.
Copy/Paste this text into Notepad.
Dir /b /a:-d /o:n > %temp%\FileList.txt
Notepad %temp%\FileList.txt
Del %temp%\FileList.txt
Save it as C:\WINDOWS\system32\FileList.bat
Be sure to specify the .bat extension.
This creates a batch file that will (1.)List the files in a Directory, and write that list to a text file in the Windows Temp Folder. (2.)Open the file in Notepad, where you can view, edit, and “Save As…”, or print out, etc. (3.)Delete the file when you’re finished (When you close Notepad)
Now, you can use this from the Command Prompt, (Just type “filelist”, and up pops Notepad with a list of the files in the Current Directory) but there’s a simpler way to use it - hook it up to your Right-Click Menu. Here’s how:-
First, create a System Restore Point using Microsoft’s System Restore. (Just in case something goes wrong)
Now, open Windows Explorer
- In the Menu Bar click “Tools > Folder Options…”
- In the Dialog Box click the “File Types” tab
- In the list of Registered file types, select “Folder” (NOT “File Folder”)
- Click the “Advanced” button
- Up comes the “Edit File Type” dialog box
- Click the “New…” button
- Up comes the “New Action” dialog box
- In the Textbox labelled “Action:” type “File List to Text”
- Click the “Browse…” button
- Up comes the “Open With” Dialog box
- Browse and select “C:\WINDOWS\system32\FileList.bat”
- Click the “Open” button
- The “New Action” Dialog Box will now show “File List to Text” and “C:\WINDOWS\system32\FileList.bat”
- Click “OK” in the “New Action” dialog box
- Click “OK” in the “Edit File Type” dialog box
- Click “OK” in the “Folder Options” dialog box
Now you’re back in Windows Explorer
In the Drive/Folder tree on the left, Right-Click on a Folder. One of the Menu options will now be “File List to Text”, click that, and (1)A Command Prompt window will open, ignore it, (2)Notepad will open with a list of the files in the folder that you Right-Clicked. Do whatever you need with the list, (Save As… to keep a copy somewhere, or print it out, etc). When you’re finished, close Notepad, and the Command Prompt window will close as well.
A few points to note. The file “C:\WINDOWS\system32\FileList.bat” must be created using Notepad, or some simple text editor. It will not work if you create it in MS Word, or any rich text editor.
The first line of the batch file - “Dir /b /a:-d /o:n” creates a Directory list in Bare format (/b), does not list folders (/a:-d), and sorts by name (o:n). It will not list files in subfolders, if you do want it to go into subfolders, add /s. If the output format is not to your liking, you can change it by changing the switches. You can get info on the various switches by typing “dir /?” at a Command prompt
In the OP, you mentioned that you want to use Word. I use Notepad because it serves my simple needs, but if you want to open FileList.txt in Word, change the second line of the batch file from “Notepad %temp%\FileList.txt” to “Word %temp%\FileList.txt”. That should work, but I haven’t tried it.
“File List to Text” is now part of your Right-Click menu for Folders, it also shows up when you Right-Click on a Drive icon.
Hope that helps