DIR >file.txt
file will be the name of the text file containing your list of files. And yes, the list of files will include this file, so you may want to delete it from the list if and when you begin editing it.
(Note: if you were not intimidated away by the word "DOS", you probably already know how to reach a DOS prompt in Windows. But in case you don't, click on the Start button (and then click "Run" if you're in Windows 98 or XP) and in the search box type CMD. When you're done using DOS, type exit to close the DOS window.)
1. Using drive prompts and the cd command, navigate to the directory where your files are located. (Again, if you're unfamiliar with DOS, here is a list of DOS commands. To change drives, type c:, where c is the drive letter where you want to navigate. To change directories, type cd directory, where directory is the name of the file folder. You may need to use this latter command multiple times to reach your target folder.)
2. Type the above code. You'll notice that nothing appears to happen; that's because the DIR command, which would normally produce a directory listing on the screen, is instead outputting to the text file you specified. (Incidentally, if you have a printer on LPT1, you can use DIR >PRN to send your directory listing to the printer.)

3. You can now open a text editor like Notepad, or an Office suite program like Word or Excel, to view, change and print the contents of this file.

0 comments:
Post a Comment