Create Directory List file ?

The machines we love to hate

Moderator: Wiz Feinberg

Post Reply
Gary Pederson
Posts: 75
Joined: 28 Oct 2000 12:01 am
Location: Van Nuys, Ca.

Create Directory List file ?

Post by Gary Pederson »

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
User avatar
Jim Smith
Posts: 7949
Joined: 4 Aug 1998 11:00 pm
Location: Midlothian, TX, USA

Post by Jim Smith »

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". Image
Gary Pederson
Posts: 75
Joined: 28 Oct 2000 12:01 am
Location: Van Nuys, Ca.

Post by Gary Pederson »

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
User avatar
Jim Smith
Posts: 7949
Joined: 4 Aug 1998 11:00 pm
Location: Midlothian, TX, USA

Post by Jim Smith »

If you had put double quotes around the directory name, you wouldn't have had to rename it. Image

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. Image
Gary Pederson
Posts: 75
Joined: 28 Oct 2000 12:01 am
Location: Van Nuys, Ca.

Post by Gary Pederson »

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
Mel Culbreath
Posts: 312
Joined: 4 Aug 1998 11:00 pm
Location: Waynesville, NC, USA

Post by Mel Culbreath »

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
Everett Cox
Posts: 497
Joined: 13 Jul 1999 12:01 am
Location: Marengo, OH, USA (deceased)

Post by Everett Cox »

Gary-- I just emailed you a small utility which does the job better and with more style than the old DOS commands.

It works very well, from within Windows, allows file filtering, multiple folder selection, and some formatting options. If anyone else wants it, let me know. --Everett
Gary Pederson
Posts: 75
Joined: 28 Oct 2000 12:01 am
Location: Van Nuys, Ca.

Post by Gary Pederson »

Jim - I found that I could resize my full screen dos window with alt+enter.

Mel- Thanks for the suggestion. Dos ain't much fun when you only use it maybe once every 5 yr. & have to relearn each time:-)
User avatar
Jim Smith
Posts: 7949
Joined: 4 Aug 1998 11:00 pm
Location: Midlothian, TX, USA

Post by Jim Smith »

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.
Post Reply