hopefully this makes sense -
I need a piece of software or a method to take a directory and output it's listing as a text file. ie:
Directory X
...... sub directory Y
............. file 1.dat
............. file 2.dat
...... sub directory Z
............. file 1.dat
............. file 2.dat
if I could output it in an Excel or OpenOffice spreadsheet, so much the better.
any info helps - this seems so simple, I can't figure out why I can't find a program or command to do it.
+ Reply to Thread
Results 1 to 22 of 22
-
- housepig
----------------
Housepig Records
out now:
Various Artists "Six Doors"
Unicorn "Playing With Light" -
okay, I hit the magic search as soon as I got off the board.
found this one: J Directory Printer.
any other more elegant, more full-featured, more configurable output solutions still welcome.- housepig
----------------
Housepig Records
out now:
Various Artists "Six Doors"
Unicorn "Playing With Light" -
command prompt commands from the MS site:
redirect
Code:DIR > XYZ.txt
Code:dir >> XYZ.txt
Hope is the trap the world sets for you every night when you go to sleep and the only reason you have to get up in the morning is the hope that this day, things will get better... But they never do, do they? -
Originally Posted by The village idiot
What's even sadder is that it had to be searched for. I had someone at work ask me last week how to get to a C prompt. They were already in a command window but it was on A:\ and they had no clue how to change it. -
try FolderInfo 2.12 it seems good, just tried was able to export to html which looked a lot neater. just make sure to go to Tools>List of Files to get what you want, defaults work fine.
http://download.com.com/3000-2248-10280159.html?tag=lst-0-1
hope that helps -
Had a command line only program a few weeks ago that I needed to convert L*a*b* measured color values to XYZ values. So I had to take an input text file "<" run through the program and get an output ">" text file. The keyword search "command promt redirect" did the job very quickly.
Somewhere I have a book for the commands for win2000, but couldn't find it.Hope is the trap the world sets for you every night when you go to sleep and the only reason you have to get up in the morning is the hope that this day, things will get better... But they never do, do they? -
Ahhh! Good ole DOS ...
C:\> dir *.* /s >dirlist.txt
Will output a director with all subdirectories to a text file.
Using a >> will append to an existing file
Ex:
C:\> dir *.* > dirlist.txt
C:\> dir c:\windows\*.* >> dirlist.txt
will output the directory listing of C:\ to a file named dirlist.txt and then the subsequent command will append the directory listing of C:\Windows to the same file. -
thanks, guys.
I swear, I was just using FreeDOS last week - honest. I'm just rusty as hell, I was thinking it was dir | file.txt or list | file.txt... I was getting hung up on the pipe symbol, thinking it was going to do something for me...- housepig
----------------
Housepig Records
out now:
Various Artists "Six Doors"
Unicorn "Playing With Light" -
Whats so hard about doing the good ole tree command?
C:\>tree /?
Graphically displays the folder structure of a drive or path.
TREE [drive:][path] [/F] [/A]
/F Display the names of the files in each folder.
/A Use ASCII instead of extended characters.
set a big buffer in the cmd window, and cut and paste to a text file -
Does Tree work in 2000? I know it works on XP, but it was disabled
in one of the windows platforms besides ME. -
Originally Posted by offline
It also works on winXP as I just tried it on this box (public computer) -
I like using TweakXP powertools, sendto options.
CTRL+A to select everything you want, right click, send to, Clipboard as name.
Paste into notepad.
This will do the same as the dir > list.txt, but it will sort them alphabetically, which the dir command won't.Cheers, Jim
My DVDLab Guides -
Originally Posted by stiltman
C:\Tree /f >dirlist.txt -
is there a switch for either the tree or the dir command that will cause the .txt file to be ordered alphabetically, rather than date order?
I'm finding the txt files are ending up in the order which I created the folders, rather than alphabetical order.- housepig
----------------
Housepig Records
out now:
Various Artists "Six Doors"
Unicorn "Playing With Light" -
Originally Posted by housepig
edit - need to be careful giving DOS commands here....People get banned for that! -
DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]
[drive:][path][filename]
Specifies drive, directory, and/or files to list.
/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files - Prefix meaning not
/B Uses bare format (no heading information or summary).
/C Display the thousand separator in file sizes. This is the
default. Use /-C to disable display of separator.
/D Same as wide but files are list sorted by column.
/L Uses lowercase.
/N New long list format where filenames are on the far right.
/O List by files in sorted order.
sortorder N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date/time (oldest first)
G Group directories first - Prefix to reverse order
/P Pauses after each screenful of information.
/Q Display the owner of the file.
/S Displays files in specified directory and all subdirectories.
/T Controls which time field displayed or used for sorting
timefield C Creation
A Last Access
W Last Written
/W Uses wide list format.
/X This displays the short names generated for non-8dot3 file
names. The format is that of /N with the short name inserted
before the long name. If no short name is present, blanks are
displayed in its place.
/4 Displays four-digit years
Switches may be preset in the DIRCMD environment variable. Override
preset switches by prefixing any switch with - (hyphen)--for example, /-W. -
By the way, just using dir /O will give you directories first, sorted alphabetically, followed by files sorted alphabetically. Using the N switch as in dir /ON will give you files and directories mixed, with everything in alphabetical order.
Standard is usually dirs first then files, but if you wanted just an alphabetical list, the other way will work. -
Originally Posted by tekkieman
will this give me:
.Directory A
.... directory a file 1.txt
.... directory a file 2.txt
.Directory B
.... directory b file 1.txt
.... directory b file 2.txt
or will it give me:
.Directory A
.Directory B
.... directory a file 1.txt
.... directory a file 2.txt
.... directory b file 1.txt
.... directory b file 2.txt
I don't have any good directories on my work computer to test this out on...
thanks so much for all your help - I feel all 'hacker style' when I'm rocking the DOS commands...- housepig
----------------
Housepig Records
out now:
Various Artists "Six Doors"
Unicorn "Playing With Light" -
Originally Posted by housepig
.Directory A
.Directory B
.... directory a file 1.txt
.... directory a file 2.txt
.... directory b file 1.txt
.... directory b file 2.txt
dir /ON will give you....
.Directory A
.... directory a file 1.txt
.... directory a file 2.txt
.Directory B
.... directory b file 1.txt
.... directory b file 2.txt -
for some reason dir is not recursing the subdirectories - I tried both dir /o and dir /on and the resulting text files only list the directories, not the files in the directories.
edit:
tried putting the /s switch in there as well, before and after /on, no love. it recurses the subdirs and lists everything, but it still comes up with the oldest folders first.
balls!- housepig
----------------
Housepig Records
out now:
Various Artists "Six Doors"
Unicorn "Playing With Light" -
Originally Posted by housepig
dir/s/on>c:\sort.txt
Here is the contents of the text file
Code:Volume in drive C has no label. Volume Serial Number is 9435-6C1C Directory of C:\Shared 06/01/2004 02:46 PM <DIR> . 06/01/2004 02:46 PM <DIR> .. 06/01/2004 10:06 AM 3,621,380 funny_mac.wmv 04/29/2004 04:40 PM 6,755 MAP.jpg 05/13/2004 10:55 AM <DIR> My Documents 07/11/2003 03:51 PM 4,989,192 perforce2002.2.exe 3 File(s) 8,617,327 bytes Directory of C:\Shared\My Documents 05/13/2004 10:55 AM <DIR> . 05/13/2004 10:55 AM <DIR> .. 05/12/2004 03:27 PM <DIR> My eBooks 05/13/2004 10:55 AM <DIR> My Music 05/12/2004 03:27 PM <DIR> My Pictures 05/12/2004 03:27 PM <DIR> My Received Files 0 File(s) 0 bytes Directory of C:\Shared\My Documents\My eBooks 05/12/2004 03:27 PM <DIR> . 05/12/2004 03:27 PM <DIR> .. 0 File(s) 0 bytes Directory of C:\Shared\My Documents\My Music 05/13/2004 10:55 AM <DIR> . 05/13/2004 10:55 AM <DIR> .. 01/28/2004 02:07 PM 857 Sample Music.lnk 1 File(s) 857 bytes Directory of C:\Shared\My Documents\My Pictures 05/12/2004 03:27 PM <DIR> . 05/12/2004 03:27 PM <DIR> .. 01/28/2004 02:07 PM 887 Sample Pictures.lnk 1 File(s) 887 bytes Directory of C:\Shared\My Documents\My Received Files 05/12/2004 03:27 PM <DIR> . 05/12/2004 03:27 PM <DIR> .. 0 File(s) 0 bytes Total Files Listed: 5 File(s) 8,619,071 bytes 17 Dir(s) 60,258,164,736 bytes free
Similar Threads
-
Batch "file creation from a text file, Placed into a created directory
By Muther in forum ProgrammingReplies: 5Last Post: 24th Sep 2015, 18:29 -
avseq01.dat file in mpegav directory
By ComputerScience in forum Newbie / General discussionsReplies: 8Last Post: 17th Jun 2011, 15:34 -
How do i burn a .txt file to CD??
By Reprobate in forum Newbie / General discussionsReplies: 6Last Post: 31st Jul 2008, 14:09 -
.txt file to .sup format
By pzoggy7 in forum SubtitleReplies: 5Last Post: 1st Jul 2008, 17:56 -
VIDEO TS Directory to a divx file...
By JustSomeGuy in forum Video ConversionReplies: 1Last Post: 6th Dec 2007, 14:10