Create Directory List file ?
Moderator: Wiz Feinberg
-
- Posts: 75
- Joined: 28 Oct 2000 12:01 am
- Location: Van Nuys, Ca.
Create Directory List file ?
I have been looking for a way to create a txt file which contains all of the file names under a selected directory on my Windows ME pc. Thanks for any suggestions.
Gary
Gary
- Jim Smith
- Posts: 7949
- Joined: 4 Aug 1998 11:00 pm
- Location: Midlothian, TX, USA
I'm not familiar with ME but it "might" be the same as my Windows 2000 box. Start a command window (DOS prompt) and cd to the directory you want, such as "cd c:\mydir". Type "dir /?" which will put the available parameters on the screen. If they scroll off the screen add "| more" to the command. "|" is the pipe command, located above the "\" on most keyboards. So that command would be "dir /? | more".
If you just want the filenames with no size or other info, and your OS supports it, do "dir /b > dir.txt". This will print the filenames to a text file named "dir.txt". This file should be placed somewhere other than the directory you are in to prevent it from being added to the list. If you want the files in subdirectories under the current directory, add "/s". Then the command would be something like "dir /b /s > c:\dir.txt".
If you just want the filenames with no size or other info, and your OS supports it, do "dir /b > dir.txt". This will print the filenames to a text file named "dir.txt". This file should be placed somewhere other than the directory you are in to prevent it from being added to the list. If you want the files in subdirectories under the current directory, add "/s". Then the command would be something like "dir /b /s > c:\dir.txt".

-
- Posts: 75
- Joined: 28 Oct 2000 12:01 am
- Location: Van Nuys, Ca.
Thanks a bunch Jim. Your suggestion did the trick. A couple of extra things I did was to temporarily rename directory to eliminate an embedded blank in order to get the cd command to work, & added /on to dir command to get file sorted by filename.
BTW, after I brought up the dos prompt window I expanded it to full screen. If I exit it & then re-open it, it is still full screen. If I re-boot & open it is full screen. Would you happen to know how to resize it?
Gary
BTW, after I brought up the dos prompt window I expanded it to full screen. If I exit it & then re-open it, it is still full screen. If I re-boot & open it is full screen. Would you happen to know how to resize it?
Gary
- Jim Smith
- Posts: 7949
- Joined: 4 Aug 1998 11:00 pm
- Location: Midlothian, TX, USA
If you had put double quotes around the directory name, you wouldn't have had to rename it. 
The DOS prompt window defaults to opening to the size and position it was the last time it was closed. So to fix it, open the DOS prompt, resize it the way you want, then close it. When you open it again it "should" be the size you left it at. If that doesn't work, right-click on the title bar, select properties, and set the size you want there.

The DOS prompt window defaults to opening to the size and position it was the last time it was closed. So to fix it, open the DOS prompt, resize it the way you want, then close it. When you open it again it "should" be the size you left it at. If that doesn't work, right-click on the title bar, select properties, and set the size you want there.

-
- Posts: 75
- Joined: 28 Oct 2000 12:01 am
- Location: Van Nuys, Ca.
Thanks a bunch Jim. Your suggestion did the trick. A couple of extra things I did was to temporarily rename directory to eliminate an embedded blank in order to get the cd command to work, & added /on to dir command to get file sorted by filename.
BTW, after I brought up the dos prompt window I expanded it to full screen. If I exit it & then re-open it, it is still full screen. If I re-boot & open it is full screen. Would you happen to know how to resize it?
Gary
BTW, after I brought up the dos prompt window I expanded it to full screen. If I exit it & then re-open it, it is still full screen. If I re-boot & open it is full screen. Would you happen to know how to resize it?
Gary
-
- Posts: 312
- Joined: 4 Aug 1998 11:00 pm
- Location: Waynesville, NC, USA
Hi Gary,
If you use DOS much you might want to add this line to your autoexec.bat file:
SET DIRCMD=/O/P
Then, each time you issue the DIR command it will cause the directories and files to be alphabetized and paused one screen at a time. By pressing any key the next screenfull will scroll up.
Ain't DOS fun?
Mel
If you use DOS much you might want to add this line to your autoexec.bat file:
SET DIRCMD=/O/P
Then, each time you issue the DIR command it will cause the directories and files to be alphabetized and paused one screen at a time. By pressing any key the next screenfull will scroll up.
Ain't DOS fun?
Mel
-
- Posts: 497
- Joined: 13 Jul 1999 12:01 am
- Location: Marengo, OH, USA (deceased)
-
- Posts: 75
- Joined: 28 Oct 2000 12:01 am
- Location: Van Nuys, Ca.
- Jim Smith
- Posts: 7949
- Joined: 4 Aug 1998 11:00 pm
- Location: Midlothian, TX, USA
Yes, Alt-Enter lets you toggle between full screen and windowed. Accessing properties allows you to customize the size and more.
For example, I set my buffer size to 80x300 so I can scroll back if I need to see previous information. I set the window size to 80x50 so I can see more on the screen at a time. I also set it to insert mode (like a word processor) so typing doesn't overwrite, and enable quick edit mode so I can copy quickly from the command prompt.
For example, I set my buffer size to 80x300 so I can scroll back if I need to see previous information. I set the window size to 80x50 so I can see more on the screen at a time. I also set it to insert mode (like a word processor) so typing doesn't overwrite, and enable quick edit mode so I can copy quickly from the command prompt.