Difference between revisions of "Copy the filenames of a directory to a text file"
m (minor formating) |
(→Type the Command) |
||
Line 30: | Line 30: | ||
dir /b > c:\dir.txt | dir /b > c:\dir.txt | ||
+ | |||
+ | {{adsense2}} | ||
=== More info === | === More info === |
Revision as of 02:30, 25 May 2006
This tutorial explains How to Copy the Filenames of a Directory to a Text Tile This can be useful if you are trying to create a catalog of files that you have. If you want to share with others via email or html the contents of a particular directory. This tutorial explains how to do this under a variety of operating systems from Microsoft to Macintosh to Linux.
This tutorial will create a text file containing the filenames of all the files in a directory.
Contents
Microsoft Operating Systems
Get to a Command Prompt
For Windows 9x and ME above - goto start/run and type command into the box and hit enter
For windows 200, NT, XP - goto start/run and type cmd into the box and hit enter
Windows 3x - I don't remember but there should be an icon somewhere in Program Manager labeled "MSDOS Command Prompt" or something similar
DOS - That's just silly, you're already there.
Type the Command
Make the directory with the files you want the current directory.
Use the Following Command
dir /b > dir.txt
This will perform the dir command with the bare formatting switch. Creates a file named "dir.txt" and puts the output of the dir command into it.
Note: This example will also include the dir.txt file in the list. If this if not acceptable then change the path for dir.txt in the command
Example:
dir /b > c:\dir.txt
More info
For more information about the dir command type the following into your command window
dir /?
Macintosh Operating Systems
Bibliography
- (ISBN 0735619816) Microsoft Windows Scripting Self-Paced Learning Guide by Ed Wilson