List all files in a folder
I have a folder with over 200 documents (Microsoft word and Excel files). I've taken care to put descriptive names for all the files. I'd now like to print out this list. Is there a way to get a list of all these files along with their file types in another Microsoft Word document.There are two ways you can get a list of all the files in a given folder. The easier of the two methods is to install a small utility, while the second is to use MS DOS commands via the terminal window. Let us look at these two options.
Polly West
Program to list all files in a folder
Folder-To-TXT is a free utility which creates a list of all the files in a folder. Extremely simple to use, this program enables you to either save the exported list of files as a .txt file or print it off directly! This freeware is an ideal solution for your needs.Here is a little tip: If you want to format the list of files, save it first as a text file. Then open this .txt file in Microsoft Word, do the necessary changes and take a printout.
The Directory Printer from KarenWare.com is another program that can print the name of every file on a drive. File size, date and time information can also be included when listing the files in a folder.
File-Utilities Directory Report is a file maintenance program with an easy-to-use interface through which you can print the list of files in a folder or save the information to a HTML, XML or text file.
Using a simple DOS command to get a list of all files in a folder
For those who want to learn something new and impress people with "geekiness", the alternate way to get a list of all files in a folder is to use the DOS Command Prompt. This option is not for the faint hearted and does require the use of a few DOS commands (detailed below).Start by opening the Command Prompt window; it's listed under "Accessories". The window will probably look like one below with a blinking cursor in front of prompt and a small message at the top.
The prompt itself shows the folder you are working on presently. For instance, C:\Users\Manish> (as in the image below) means, I am in "Manish folder which is inside "Users folder in the C: drive. To move to the folder that has the list of the files, execute the following commands at the prompt:
cd THE-FULL-DIRECTORY-PATH
dir >folder-file-list.txt
- THE-FULL-DIRECTORY-PATH needs to be replaced with the actual path and starts with the drive letter and ends with the name of the folder that contains the files you want to list.
- The dir DOS command will list the files in the directory which is then saved in a text file with the name folder-file-list.txt; you can use any file name, though make sure it ends with the .txt extension.
The listing produced by dir in its barebones form can be changed using switches which can refine the command. For instance:
- dir/b /on
Lists only the file names ordered by name. The /on switch tells the system to Order the output based on Names. - dir/b /os *.doc
Lists only Microsoft Word documents ordered by their file sizes. /os switch Orders based on file Size. The asterisk (*) is a wildcard character that means "everything". - dir/w /on *.xls
Displays only Excel documents in a wide list format ordered by their file names.
Here are some other DOS commands that you may like to know.
- cd DIRECTORY NAME
cd (change directory) followed by the directory/folder name is to be used when moving to a subdirectory (a directory inside the one you are working). - cd ..
cd followed by a space and two periods will move you up the directory tree - cd DRIVE-LETTER
changes the drive in which you are working. Thus, cd D: moves you to the root of the D: drive.
Page contents: List all files in a folder using a free program ot some simple DOS commands.
No comments:
Post a Comment