Saved Bookmarks
| 1. |
Solve : Re: Printing contents of directory to file to prin? |
|
Answer» GO to c prompt, type : dir > dirfile.txt dir will list the dir, > will redirect the output to a txt file. u can print the txt file. pretty neat trick ; pI've been experimenting with the "TREE" and the "DIR" commands to create a text file on my hard drive listing the following details and information about a data DVD I created: all the DIRECTORIES, subdirectories, complete long file names within each directory, sizes, and dates they were last ACCESSED. However, the best set of commands and parameters I've been able to devise is: F:\DIR /A /N /P > e:\DVD_contents.wpd which lists (in a text file) directory and file information from left to right in the following order: date, time, if a directory it lists followed by the directory name; if NOT a directory it lists the file size, then file name. For example, it looks something like this: 08/22/2004 04:49 PM Smith 01/30/1848 06:14 AM 30,474 Addresslist.wpd I know the date is goofy, but that's what shows up in DOS when I'm trying to do this. I also know that my hard drive is E, rather than C. That happened when I took my computer in for repair. Anyway, those aren't things I care to worry about right now. I want to learn how to create a text file listing details about the directories, subdirectories and files on a data DVD such as the following: Directory names, subdirectories if any, followed by a list of all files in each directory (or subdirectory), followed by their sizes, dates (with full four-digit year) and times. Can anyone assist me please?Thank you for your response. I am grateful. However, I may have confused you and for that I apologize. The ".txt" extension is, in my case, the same as the ".wpd" extension because the latter is a WordPerfect file format. That said, your instructions only provide directory names and files that are in the root directory and not in any directory. For example, here is what I get when I employ your instructions: 08/21/2004 09:33 PM Bradbury 08/22/2004 04:49 PM Morgan 01/08/2004 01:49 AM Smith 01/30/2004 06:14 AM 30,474 Ra.wpd 03/12/2004 03:57 AM 23,100 AD.wpd What I want is the following: Bradbury 08/21/2004 09:33 PM Morgan 08/22/2004 04:49 PM Smith 01/08/2004 01:49 AM 30,474 Ra.wpd 01/30/2004 06:14 AM 23,100 AD.wpd 03/12/2004 03:57 AM And I want the listing of all subdirectories and their CONTENTS beneath each . With that additional information, is there a way to accomplish this with DOS? Thank you in advance. |
|