Announcement

Collapse
No announcement yet.

printing a list of a full directory structure

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    printing a list of a full directory structure

    Is there a way to print a list of a directory structure down to the file level?

    I want to keep a listing of how I have files organized within a directory (folder).

    #2
    Jeff,

    The only way I know how is through a command prompt using the DIR command (and associated switches) and then piping the results to the standard PRN port or to a file.

    Open a comand prompt and type DIR /? to get a list of the switches. Once you format the output the way you want include the > PRN at the end of the command to send it to your printer. You can also send it to a file name the same way (> files.txt). I believe trying to print this way only works if your printer is locally connected to the parallel port. USB printers and network accessible printer probably won't work. But getting the list to a text file gives you the ability to edit the file before you print it where ever you want.

    Good Luck,


    Chuck

    Comment


      #3
      How to list directory structure

      I found this small program when I was looking for just such a program recently. Go to: http://freeware.prv.pl/ and download DIRECTORYLISTER.

      It's only a 98K install, and the best part, is that it is free.
      Should do the trick for you.

      Comment


        #4
        Simple script to generate a .txt file of current and subfolders indentured. Copy the text into a file with .vbs extension and place this file in the folder that is the root of where you want the list produced. A .txt file will be made that contains the list.

        PHP Code:
        'Indented File list
        '
        Copy to starting folder
        'Run and file of same name with .txt will be produced in same folder


        Dim Indent, fso, tso, here, dots

        set fso = CreateObject("Scripting.FileSystemObject")
        here = WScript.ScriptFullName

        set tso = fso.CreateTextFile(replace(here,".vbs",".txt"))

        Indent = 1
        Dots = " ...|....|....|....|....|....|....|....|....|....|....|....|....|"

        DrillDown fso.GetFolder(left(here,instrRev(here,"\")-1))

        set tso = nothing
        set fso = nothing

        sub DrillDown(oFolder)
            tso.Writeline left(Dots,Indent) & oFolder.Name 
            Indent = Indent + 2
            for each oFile in oFolder.Files
                tso.Writeline left(Dots,Indent) & oFile.Name
            next

            for each oSubFolder in oFolder.subFolders
                DrillDown oSubFolder
            next
            Indent = Indent - 2
        end sub 

        Comment


          #5
          excellant! thanks - I"ll try these

          Comment

          Working...
          X