How can I export a directory structure in Windows?












62















In Windows Explorer, there is a tree-view to see the overview of a directory structure. I want to share the structure to other people.



How can I get a browsable tree-view of the directory structure of a partition and export that file-list, so that others can view it without access to the partition?



To clarify, I am not interested in the files themselves. I just need a hierarchical listing of all files. Zipping them all up is not what I want.










share|improve this question




















  • 1





    This may help: How To Print A Directory Tree From Windows Explorer

    – bgvaughan
    Apr 25 '11 at 19:58











  • If you want, I can write an AutoIt script to export the directory listing into plain-text in whatever style you would like. You could then write a program to parse it back into a directory-view like style.

    – Breakthrough
    Aug 4 '11 at 13:38













  • Related question at Stack Overflow.

    – trejder
    Dec 19 '14 at 21:43
















62















In Windows Explorer, there is a tree-view to see the overview of a directory structure. I want to share the structure to other people.



How can I get a browsable tree-view of the directory structure of a partition and export that file-list, so that others can view it without access to the partition?



To clarify, I am not interested in the files themselves. I just need a hierarchical listing of all files. Zipping them all up is not what I want.










share|improve this question




















  • 1





    This may help: How To Print A Directory Tree From Windows Explorer

    – bgvaughan
    Apr 25 '11 at 19:58











  • If you want, I can write an AutoIt script to export the directory listing into plain-text in whatever style you would like. You could then write a program to parse it back into a directory-view like style.

    – Breakthrough
    Aug 4 '11 at 13:38













  • Related question at Stack Overflow.

    – trejder
    Dec 19 '14 at 21:43














62












62








62


34






In Windows Explorer, there is a tree-view to see the overview of a directory structure. I want to share the structure to other people.



How can I get a browsable tree-view of the directory structure of a partition and export that file-list, so that others can view it without access to the partition?



To clarify, I am not interested in the files themselves. I just need a hierarchical listing of all files. Zipping them all up is not what I want.










share|improve this question
















In Windows Explorer, there is a tree-view to see the overview of a directory structure. I want to share the structure to other people.



How can I get a browsable tree-view of the directory structure of a partition and export that file-list, so that others can view it without access to the partition?



To clarify, I am not interested in the files themselves. I just need a hierarchical listing of all files. Zipping them all up is not what I want.







windows directory-listing






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 31 at 5:12









Andrew T.

2101211




2101211










asked Mar 16 '11 at 11:31









Björn PollexBjörn Pollex

5681612




5681612








  • 1





    This may help: How To Print A Directory Tree From Windows Explorer

    – bgvaughan
    Apr 25 '11 at 19:58











  • If you want, I can write an AutoIt script to export the directory listing into plain-text in whatever style you would like. You could then write a program to parse it back into a directory-view like style.

    – Breakthrough
    Aug 4 '11 at 13:38













  • Related question at Stack Overflow.

    – trejder
    Dec 19 '14 at 21:43














  • 1





    This may help: How To Print A Directory Tree From Windows Explorer

    – bgvaughan
    Apr 25 '11 at 19:58











  • If you want, I can write an AutoIt script to export the directory listing into plain-text in whatever style you would like. You could then write a program to parse it back into a directory-view like style.

    – Breakthrough
    Aug 4 '11 at 13:38













  • Related question at Stack Overflow.

    – trejder
    Dec 19 '14 at 21:43








1




1





This may help: How To Print A Directory Tree From Windows Explorer

– bgvaughan
Apr 25 '11 at 19:58





This may help: How To Print A Directory Tree From Windows Explorer

– bgvaughan
Apr 25 '11 at 19:58













If you want, I can write an AutoIt script to export the directory listing into plain-text in whatever style you would like. You could then write a program to parse it back into a directory-view like style.

– Breakthrough
Aug 4 '11 at 13:38







If you want, I can write an AutoIt script to export the directory listing into plain-text in whatever style you would like. You could then write a program to parse it back into a directory-view like style.

– Breakthrough
Aug 4 '11 at 13:38















Related question at Stack Overflow.

– trejder
Dec 19 '14 at 21:43





Related question at Stack Overflow.

– trejder
Dec 19 '14 at 21:43










12 Answers
12






active

oldest

votes


















82














Assuming your directory tree is of reasonable size, you could also use the built in tree command, which produces a rather pretty looking directory tree. Unfortunately this prettiness is difficult to get working outside of a cmd instance, so you'll probably want to tell it to just use ascii characters with the /A switch.



Example:



From a small multi-level structure



+---A
| +---A
| ---B
+---B
| ---A
| ---A
---C


You can then redirect this to a file using a command like:



tree /A ["directory path"] > tree.txt


Where the directory path is optional, but useful if you want to tree something which isn't the current working directory.






share|improve this answer





















  • 2





    You can also pipe this output to a text file by doing: tree E: A F > output.txt

    – xan
    Aug 4 '11 at 13:35













  • @xan; Whoops, that was the important bit of the answer and I completely forgot about it! Thanks

    – Phoshi
    Aug 4 '11 at 13:37











  • @xan just FYI, you need to use forward-slashes (/) instead of backslashes for command line argument identifiers. Backslashes are directory tree separators in Windows systems.

    – Breakthrough
    Aug 4 '11 at 13:39








  • 3





    @Breakthrough: Whoops - yes, tree E: /A /F > output.txt - mistyped my slashes!

    – xan
    Aug 4 '11 at 15:32






  • 3





    You can also show the filenames below their parent folder on the tree structure by adding the /f option like this: tree /A /f ["directory path"] > tree.txt

    – Ulysses Alves
    Dec 23 '16 at 17:29





















19














If you want to use powershell the code is very simple and the output is nice.



Code:



Get-ChildItem | tree


With



Get-ChildItem | tree > foo.txt


you can pipe the output to a Textfile.



Example Output:



Auflistung der Ordnerpfade für Volume System
Volumeseriennummer : 48E9-F43B
C:.
├───Contacts
├───Desktop
├───Downloads
│ └───Evernote Import
├───Dropbox
│ ├───Apps
│ │ └───iftttcom
│ │ └───getpocketpdf
│ ├───Backup
│ ├───Camera Uploads
│ ├───Development





share|improve this answer

































    10














    You can also put the results directly into the clipboard (in Vista+):



    tree | clip





    share|improve this answer

































      9














      While you most likely want the output of the TREE command (e.g. TREE /F > output.txt) in this case, if raw text as the output is fine, then you can run the following from a command prompt:



      DIR C: /S > output.txt


      Where output.txt will be generated in the current working directory, and contain a listing of all files and directories on the C: drive. If you want just an output of files with their full paths, run the following:



      DIR C: /B /S > output.txt


      It would also be a trivial task to write a program to parse the output back into a directory view style program for you to view.






      share|improve this answer

































        6














        Open command prompt window --> Go to your directory path



        Then run the following command to generate



        tree /f /a > tree.doc


        Above command will make the folder and files structure recursively and export to word document file.
        You can find "tree.doc" created in the same folder






        share|improve this answer

































          5














          Use the following powershell command, also remember that you can export it to Xml, csv or to database. Also I have restricted properties to full name and name, you can use other properties like modified timestamp etc.



          Get-ChildItem -Recurse 'Z:temp' *.xml | Select-Object -Property FullName,name | Export-Csv directory_structure.csv





          share|improve this answer

































            3














            I have created a program specifically for this - Directory Snapshot.

            It recursively iterates through a directory and stores the names and sizes of all the files and folders it encounters in neatly-structured HTML files, which have an organization similar to that of the input directory.

            In other words, this can be thought of as a hyperlinked version of the dir /s or tree /f commands.






            share|improve this answer

































              1














              Although this has already been answered, I came looking here for the solution, but didn't find it.



              Looking further, I found this : http://gnuwin32.sourceforge.net/packages/tree.htm



              With that I can follow the instructions of http://nsaunders.wordpress.com/2010/11/16/dropbox-tip-continued-convert-a-file-tree-to-html/ , and create a HTML tree of my Dropbox public folder, and in that way share a directory tree very easy.






              share|improve this answer































                1














                Try this powershell script if you want to list the number of files in each directory from your current location...



                $dirs = Get-ChildItem -recurse | Where{$_.psIsContainer -eq $true} ; ForEach($d in $dirs){ "{0,6} | {1,-1}" -f (Get-ChildItem -path $d.fullname -recurse | where {$_.psIsContainer -ne $true}).count,$d.fullname >> file_counts.txt }





                share|improve this answer































                  0














                  You could just use xcopy with the /T and /E option to copy only directories. That would get you a complete and browsable copy of the structure, and answers the first part of your question. Does not let you view files though...






                  share|improve this answer































                    0














                    You could use an archiving tool, such as WinZIP that can zip an entire directory structure into a single file, that you can, for example, transfer on a network, or put on a USB disk. Some tools will also keep flags such as read-only, archive, etc.



                    Under Linux, my favorite tool for such action is tar, that will take an entire directory structure into a single file, which I can couple with gzip to actually compress the whole thing.






                    share|improve this answer































                      -1














                      I found the easiest way going to command prompt and entering (in my case I needed the K: directory)



                      tree K: > tree.doc


                      I chose a Word document since I needed something user friendly. Just select MS-Dos when opening it in Word and it'll look great.






                      share|improve this answer






















                        protected by Community Dec 24 '16 at 11:09



                        Thank you for your interest in this question.
                        Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                        Would you like to answer one of these unanswered questions instead?














                        12 Answers
                        12






                        active

                        oldest

                        votes








                        12 Answers
                        12






                        active

                        oldest

                        votes









                        active

                        oldest

                        votes






                        active

                        oldest

                        votes









                        82














                        Assuming your directory tree is of reasonable size, you could also use the built in tree command, which produces a rather pretty looking directory tree. Unfortunately this prettiness is difficult to get working outside of a cmd instance, so you'll probably want to tell it to just use ascii characters with the /A switch.



                        Example:



                        From a small multi-level structure



                        +---A
                        | +---A
                        | ---B
                        +---B
                        | ---A
                        | ---A
                        ---C


                        You can then redirect this to a file using a command like:



                        tree /A ["directory path"] > tree.txt


                        Where the directory path is optional, but useful if you want to tree something which isn't the current working directory.






                        share|improve this answer





















                        • 2





                          You can also pipe this output to a text file by doing: tree E: A F > output.txt

                          – xan
                          Aug 4 '11 at 13:35













                        • @xan; Whoops, that was the important bit of the answer and I completely forgot about it! Thanks

                          – Phoshi
                          Aug 4 '11 at 13:37











                        • @xan just FYI, you need to use forward-slashes (/) instead of backslashes for command line argument identifiers. Backslashes are directory tree separators in Windows systems.

                          – Breakthrough
                          Aug 4 '11 at 13:39








                        • 3





                          @Breakthrough: Whoops - yes, tree E: /A /F > output.txt - mistyped my slashes!

                          – xan
                          Aug 4 '11 at 15:32






                        • 3





                          You can also show the filenames below their parent folder on the tree structure by adding the /f option like this: tree /A /f ["directory path"] > tree.txt

                          – Ulysses Alves
                          Dec 23 '16 at 17:29


















                        82














                        Assuming your directory tree is of reasonable size, you could also use the built in tree command, which produces a rather pretty looking directory tree. Unfortunately this prettiness is difficult to get working outside of a cmd instance, so you'll probably want to tell it to just use ascii characters with the /A switch.



                        Example:



                        From a small multi-level structure



                        +---A
                        | +---A
                        | ---B
                        +---B
                        | ---A
                        | ---A
                        ---C


                        You can then redirect this to a file using a command like:



                        tree /A ["directory path"] > tree.txt


                        Where the directory path is optional, but useful if you want to tree something which isn't the current working directory.






                        share|improve this answer





















                        • 2





                          You can also pipe this output to a text file by doing: tree E: A F > output.txt

                          – xan
                          Aug 4 '11 at 13:35













                        • @xan; Whoops, that was the important bit of the answer and I completely forgot about it! Thanks

                          – Phoshi
                          Aug 4 '11 at 13:37











                        • @xan just FYI, you need to use forward-slashes (/) instead of backslashes for command line argument identifiers. Backslashes are directory tree separators in Windows systems.

                          – Breakthrough
                          Aug 4 '11 at 13:39








                        • 3





                          @Breakthrough: Whoops - yes, tree E: /A /F > output.txt - mistyped my slashes!

                          – xan
                          Aug 4 '11 at 15:32






                        • 3





                          You can also show the filenames below their parent folder on the tree structure by adding the /f option like this: tree /A /f ["directory path"] > tree.txt

                          – Ulysses Alves
                          Dec 23 '16 at 17:29
















                        82












                        82








                        82







                        Assuming your directory tree is of reasonable size, you could also use the built in tree command, which produces a rather pretty looking directory tree. Unfortunately this prettiness is difficult to get working outside of a cmd instance, so you'll probably want to tell it to just use ascii characters with the /A switch.



                        Example:



                        From a small multi-level structure



                        +---A
                        | +---A
                        | ---B
                        +---B
                        | ---A
                        | ---A
                        ---C


                        You can then redirect this to a file using a command like:



                        tree /A ["directory path"] > tree.txt


                        Where the directory path is optional, but useful if you want to tree something which isn't the current working directory.






                        share|improve this answer















                        Assuming your directory tree is of reasonable size, you could also use the built in tree command, which produces a rather pretty looking directory tree. Unfortunately this prettiness is difficult to get working outside of a cmd instance, so you'll probably want to tell it to just use ascii characters with the /A switch.



                        Example:



                        From a small multi-level structure



                        +---A
                        | +---A
                        | ---B
                        +---B
                        | ---A
                        | ---A
                        ---C


                        You can then redirect this to a file using a command like:



                        tree /A ["directory path"] > tree.txt


                        Where the directory path is optional, but useful if you want to tree something which isn't the current working directory.







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Aug 4 '11 at 13:41

























                        answered Aug 4 '11 at 13:22









                        PhoshiPhoshi

                        21.2k25277




                        21.2k25277








                        • 2





                          You can also pipe this output to a text file by doing: tree E: A F > output.txt

                          – xan
                          Aug 4 '11 at 13:35













                        • @xan; Whoops, that was the important bit of the answer and I completely forgot about it! Thanks

                          – Phoshi
                          Aug 4 '11 at 13:37











                        • @xan just FYI, you need to use forward-slashes (/) instead of backslashes for command line argument identifiers. Backslashes are directory tree separators in Windows systems.

                          – Breakthrough
                          Aug 4 '11 at 13:39








                        • 3





                          @Breakthrough: Whoops - yes, tree E: /A /F > output.txt - mistyped my slashes!

                          – xan
                          Aug 4 '11 at 15:32






                        • 3





                          You can also show the filenames below their parent folder on the tree structure by adding the /f option like this: tree /A /f ["directory path"] > tree.txt

                          – Ulysses Alves
                          Dec 23 '16 at 17:29
















                        • 2





                          You can also pipe this output to a text file by doing: tree E: A F > output.txt

                          – xan
                          Aug 4 '11 at 13:35













                        • @xan; Whoops, that was the important bit of the answer and I completely forgot about it! Thanks

                          – Phoshi
                          Aug 4 '11 at 13:37











                        • @xan just FYI, you need to use forward-slashes (/) instead of backslashes for command line argument identifiers. Backslashes are directory tree separators in Windows systems.

                          – Breakthrough
                          Aug 4 '11 at 13:39








                        • 3





                          @Breakthrough: Whoops - yes, tree E: /A /F > output.txt - mistyped my slashes!

                          – xan
                          Aug 4 '11 at 15:32






                        • 3





                          You can also show the filenames below their parent folder on the tree structure by adding the /f option like this: tree /A /f ["directory path"] > tree.txt

                          – Ulysses Alves
                          Dec 23 '16 at 17:29










                        2




                        2





                        You can also pipe this output to a text file by doing: tree E: A F > output.txt

                        – xan
                        Aug 4 '11 at 13:35







                        You can also pipe this output to a text file by doing: tree E: A F > output.txt

                        – xan
                        Aug 4 '11 at 13:35















                        @xan; Whoops, that was the important bit of the answer and I completely forgot about it! Thanks

                        – Phoshi
                        Aug 4 '11 at 13:37





                        @xan; Whoops, that was the important bit of the answer and I completely forgot about it! Thanks

                        – Phoshi
                        Aug 4 '11 at 13:37













                        @xan just FYI, you need to use forward-slashes (/) instead of backslashes for command line argument identifiers. Backslashes are directory tree separators in Windows systems.

                        – Breakthrough
                        Aug 4 '11 at 13:39







                        @xan just FYI, you need to use forward-slashes (/) instead of backslashes for command line argument identifiers. Backslashes are directory tree separators in Windows systems.

                        – Breakthrough
                        Aug 4 '11 at 13:39






                        3




                        3





                        @Breakthrough: Whoops - yes, tree E: /A /F > output.txt - mistyped my slashes!

                        – xan
                        Aug 4 '11 at 15:32





                        @Breakthrough: Whoops - yes, tree E: /A /F > output.txt - mistyped my slashes!

                        – xan
                        Aug 4 '11 at 15:32




                        3




                        3





                        You can also show the filenames below their parent folder on the tree structure by adding the /f option like this: tree /A /f ["directory path"] > tree.txt

                        – Ulysses Alves
                        Dec 23 '16 at 17:29







                        You can also show the filenames below their parent folder on the tree structure by adding the /f option like this: tree /A /f ["directory path"] > tree.txt

                        – Ulysses Alves
                        Dec 23 '16 at 17:29















                        19














                        If you want to use powershell the code is very simple and the output is nice.



                        Code:



                        Get-ChildItem | tree


                        With



                        Get-ChildItem | tree > foo.txt


                        you can pipe the output to a Textfile.



                        Example Output:



                        Auflistung der Ordnerpfade für Volume System
                        Volumeseriennummer : 48E9-F43B
                        C:.
                        ├───Contacts
                        ├───Desktop
                        ├───Downloads
                        │ └───Evernote Import
                        ├───Dropbox
                        │ ├───Apps
                        │ │ └───iftttcom
                        │ │ └───getpocketpdf
                        │ ├───Backup
                        │ ├───Camera Uploads
                        │ ├───Development





                        share|improve this answer






























                          19














                          If you want to use powershell the code is very simple and the output is nice.



                          Code:



                          Get-ChildItem | tree


                          With



                          Get-ChildItem | tree > foo.txt


                          you can pipe the output to a Textfile.



                          Example Output:



                          Auflistung der Ordnerpfade für Volume System
                          Volumeseriennummer : 48E9-F43B
                          C:.
                          ├───Contacts
                          ├───Desktop
                          ├───Downloads
                          │ └───Evernote Import
                          ├───Dropbox
                          │ ├───Apps
                          │ │ └───iftttcom
                          │ │ └───getpocketpdf
                          │ ├───Backup
                          │ ├───Camera Uploads
                          │ ├───Development





                          share|improve this answer




























                            19












                            19








                            19







                            If you want to use powershell the code is very simple and the output is nice.



                            Code:



                            Get-ChildItem | tree


                            With



                            Get-ChildItem | tree > foo.txt


                            you can pipe the output to a Textfile.



                            Example Output:



                            Auflistung der Ordnerpfade für Volume System
                            Volumeseriennummer : 48E9-F43B
                            C:.
                            ├───Contacts
                            ├───Desktop
                            ├───Downloads
                            │ └───Evernote Import
                            ├───Dropbox
                            │ ├───Apps
                            │ │ └───iftttcom
                            │ │ └───getpocketpdf
                            │ ├───Backup
                            │ ├───Camera Uploads
                            │ ├───Development





                            share|improve this answer















                            If you want to use powershell the code is very simple and the output is nice.



                            Code:



                            Get-ChildItem | tree


                            With



                            Get-ChildItem | tree > foo.txt


                            you can pipe the output to a Textfile.



                            Example Output:



                            Auflistung der Ordnerpfade für Volume System
                            Volumeseriennummer : 48E9-F43B
                            C:.
                            ├───Contacts
                            ├───Desktop
                            ├───Downloads
                            │ └───Evernote Import
                            ├───Dropbox
                            │ ├───Apps
                            │ │ └───iftttcom
                            │ │ └───getpocketpdf
                            │ ├───Backup
                            │ ├───Camera Uploads
                            │ ├───Development






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Jul 18 '12 at 3:10









                            James Mertz

                            19.9k41100155




                            19.9k41100155










                            answered Jul 17 '12 at 14:32









                            Marcel JanusMarcel Janus

                            354311




                            354311























                                10














                                You can also put the results directly into the clipboard (in Vista+):



                                tree | clip





                                share|improve this answer






























                                  10














                                  You can also put the results directly into the clipboard (in Vista+):



                                  tree | clip





                                  share|improve this answer




























                                    10












                                    10








                                    10







                                    You can also put the results directly into the clipboard (in Vista+):



                                    tree | clip





                                    share|improve this answer















                                    You can also put the results directly into the clipboard (in Vista+):



                                    tree | clip






                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Dec 18 '13 at 12:34

























                                    answered Dec 18 '13 at 12:25









                                    Chris SmithChris Smith

                                    10115




                                    10115























                                        9














                                        While you most likely want the output of the TREE command (e.g. TREE /F > output.txt) in this case, if raw text as the output is fine, then you can run the following from a command prompt:



                                        DIR C: /S > output.txt


                                        Where output.txt will be generated in the current working directory, and contain a listing of all files and directories on the C: drive. If you want just an output of files with their full paths, run the following:



                                        DIR C: /B /S > output.txt


                                        It would also be a trivial task to write a program to parse the output back into a directory view style program for you to view.






                                        share|improve this answer






























                                          9














                                          While you most likely want the output of the TREE command (e.g. TREE /F > output.txt) in this case, if raw text as the output is fine, then you can run the following from a command prompt:



                                          DIR C: /S > output.txt


                                          Where output.txt will be generated in the current working directory, and contain a listing of all files and directories on the C: drive. If you want just an output of files with their full paths, run the following:



                                          DIR C: /B /S > output.txt


                                          It would also be a trivial task to write a program to parse the output back into a directory view style program for you to view.






                                          share|improve this answer




























                                            9












                                            9








                                            9







                                            While you most likely want the output of the TREE command (e.g. TREE /F > output.txt) in this case, if raw text as the output is fine, then you can run the following from a command prompt:



                                            DIR C: /S > output.txt


                                            Where output.txt will be generated in the current working directory, and contain a listing of all files and directories on the C: drive. If you want just an output of files with their full paths, run the following:



                                            DIR C: /B /S > output.txt


                                            It would also be a trivial task to write a program to parse the output back into a directory view style program for you to view.






                                            share|improve this answer















                                            While you most likely want the output of the TREE command (e.g. TREE /F > output.txt) in this case, if raw text as the output is fine, then you can run the following from a command prompt:



                                            DIR C: /S > output.txt


                                            Where output.txt will be generated in the current working directory, and contain a listing of all files and directories on the C: drive. If you want just an output of files with their full paths, run the following:



                                            DIR C: /B /S > output.txt


                                            It would also be a trivial task to write a program to parse the output back into a directory view style program for you to view.







                                            share|improve this answer














                                            share|improve this answer



                                            share|improve this answer








                                            edited Jul 9 '15 at 4:29

























                                            answered Aug 4 '11 at 13:33









                                            BreakthroughBreakthrough

                                            31.6k993141




                                            31.6k993141























                                                6














                                                Open command prompt window --> Go to your directory path



                                                Then run the following command to generate



                                                tree /f /a > tree.doc


                                                Above command will make the folder and files structure recursively and export to word document file.
                                                You can find "tree.doc" created in the same folder






                                                share|improve this answer






























                                                  6














                                                  Open command prompt window --> Go to your directory path



                                                  Then run the following command to generate



                                                  tree /f /a > tree.doc


                                                  Above command will make the folder and files structure recursively and export to word document file.
                                                  You can find "tree.doc" created in the same folder






                                                  share|improve this answer




























                                                    6












                                                    6








                                                    6







                                                    Open command prompt window --> Go to your directory path



                                                    Then run the following command to generate



                                                    tree /f /a > tree.doc


                                                    Above command will make the folder and files structure recursively and export to word document file.
                                                    You can find "tree.doc" created in the same folder






                                                    share|improve this answer















                                                    Open command prompt window --> Go to your directory path



                                                    Then run the following command to generate



                                                    tree /f /a > tree.doc


                                                    Above command will make the folder and files structure recursively and export to word document file.
                                                    You can find "tree.doc" created in the same folder







                                                    share|improve this answer














                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited Oct 3 '15 at 23:51









                                                    Canadian Luke

                                                    18.1k3091149




                                                    18.1k3091149










                                                    answered Jun 2 '15 at 9:13









                                                    Vivek ChaturvediVivek Chaturvedi

                                                    6113




                                                    6113























                                                        5














                                                        Use the following powershell command, also remember that you can export it to Xml, csv or to database. Also I have restricted properties to full name and name, you can use other properties like modified timestamp etc.



                                                        Get-ChildItem -Recurse 'Z:temp' *.xml | Select-Object -Property FullName,name | Export-Csv directory_structure.csv





                                                        share|improve this answer






























                                                          5














                                                          Use the following powershell command, also remember that you can export it to Xml, csv or to database. Also I have restricted properties to full name and name, you can use other properties like modified timestamp etc.



                                                          Get-ChildItem -Recurse 'Z:temp' *.xml | Select-Object -Property FullName,name | Export-Csv directory_structure.csv





                                                          share|improve this answer




























                                                            5












                                                            5








                                                            5







                                                            Use the following powershell command, also remember that you can export it to Xml, csv or to database. Also I have restricted properties to full name and name, you can use other properties like modified timestamp etc.



                                                            Get-ChildItem -Recurse 'Z:temp' *.xml | Select-Object -Property FullName,name | Export-Csv directory_structure.csv





                                                            share|improve this answer















                                                            Use the following powershell command, also remember that you can export it to Xml, csv or to database. Also I have restricted properties to full name and name, you can use other properties like modified timestamp etc.



                                                            Get-ChildItem -Recurse 'Z:temp' *.xml | Select-Object -Property FullName,name | Export-Csv directory_structure.csv






                                                            share|improve this answer














                                                            share|improve this answer



                                                            share|improve this answer








                                                            edited Mar 6 '13 at 4:39









                                                            Sathyajith Bhat

                                                            53k29157253




                                                            53k29157253










                                                            answered Mar 6 '13 at 1:32









                                                            user204518user204518

                                                            5111




                                                            5111























                                                                3














                                                                I have created a program specifically for this - Directory Snapshot.

                                                                It recursively iterates through a directory and stores the names and sizes of all the files and folders it encounters in neatly-structured HTML files, which have an organization similar to that of the input directory.

                                                                In other words, this can be thought of as a hyperlinked version of the dir /s or tree /f commands.






                                                                share|improve this answer






























                                                                  3














                                                                  I have created a program specifically for this - Directory Snapshot.

                                                                  It recursively iterates through a directory and stores the names and sizes of all the files and folders it encounters in neatly-structured HTML files, which have an organization similar to that of the input directory.

                                                                  In other words, this can be thought of as a hyperlinked version of the dir /s or tree /f commands.






                                                                  share|improve this answer




























                                                                    3












                                                                    3








                                                                    3







                                                                    I have created a program specifically for this - Directory Snapshot.

                                                                    It recursively iterates through a directory and stores the names and sizes of all the files and folders it encounters in neatly-structured HTML files, which have an organization similar to that of the input directory.

                                                                    In other words, this can be thought of as a hyperlinked version of the dir /s or tree /f commands.






                                                                    share|improve this answer















                                                                    I have created a program specifically for this - Directory Snapshot.

                                                                    It recursively iterates through a directory and stores the names and sizes of all the files and folders it encounters in neatly-structured HTML files, which have an organization similar to that of the input directory.

                                                                    In other words, this can be thought of as a hyperlinked version of the dir /s or tree /f commands.







                                                                    share|improve this answer














                                                                    share|improve this answer



                                                                    share|improve this answer








                                                                    edited Mar 29 '15 at 7:14

























                                                                    answered Mar 25 '15 at 21:12









                                                                    Anmol Singh JaggiAnmol Singh Jaggi

                                                                    176111




                                                                    176111























                                                                        1














                                                                        Although this has already been answered, I came looking here for the solution, but didn't find it.



                                                                        Looking further, I found this : http://gnuwin32.sourceforge.net/packages/tree.htm



                                                                        With that I can follow the instructions of http://nsaunders.wordpress.com/2010/11/16/dropbox-tip-continued-convert-a-file-tree-to-html/ , and create a HTML tree of my Dropbox public folder, and in that way share a directory tree very easy.






                                                                        share|improve this answer




























                                                                          1














                                                                          Although this has already been answered, I came looking here for the solution, but didn't find it.



                                                                          Looking further, I found this : http://gnuwin32.sourceforge.net/packages/tree.htm



                                                                          With that I can follow the instructions of http://nsaunders.wordpress.com/2010/11/16/dropbox-tip-continued-convert-a-file-tree-to-html/ , and create a HTML tree of my Dropbox public folder, and in that way share a directory tree very easy.






                                                                          share|improve this answer


























                                                                            1












                                                                            1








                                                                            1







                                                                            Although this has already been answered, I came looking here for the solution, but didn't find it.



                                                                            Looking further, I found this : http://gnuwin32.sourceforge.net/packages/tree.htm



                                                                            With that I can follow the instructions of http://nsaunders.wordpress.com/2010/11/16/dropbox-tip-continued-convert-a-file-tree-to-html/ , and create a HTML tree of my Dropbox public folder, and in that way share a directory tree very easy.






                                                                            share|improve this answer













                                                                            Although this has already been answered, I came looking here for the solution, but didn't find it.



                                                                            Looking further, I found this : http://gnuwin32.sourceforge.net/packages/tree.htm



                                                                            With that I can follow the instructions of http://nsaunders.wordpress.com/2010/11/16/dropbox-tip-continued-convert-a-file-tree-to-html/ , and create a HTML tree of my Dropbox public folder, and in that way share a directory tree very easy.







                                                                            share|improve this answer












                                                                            share|improve this answer



                                                                            share|improve this answer










                                                                            answered Jul 17 '12 at 14:12









                                                                            Jan van HaarstJan van Haarst

                                                                            363




                                                                            363























                                                                                1














                                                                                Try this powershell script if you want to list the number of files in each directory from your current location...



                                                                                $dirs = Get-ChildItem -recurse | Where{$_.psIsContainer -eq $true} ; ForEach($d in $dirs){ "{0,6} | {1,-1}" -f (Get-ChildItem -path $d.fullname -recurse | where {$_.psIsContainer -ne $true}).count,$d.fullname >> file_counts.txt }





                                                                                share|improve this answer




























                                                                                  1














                                                                                  Try this powershell script if you want to list the number of files in each directory from your current location...



                                                                                  $dirs = Get-ChildItem -recurse | Where{$_.psIsContainer -eq $true} ; ForEach($d in $dirs){ "{0,6} | {1,-1}" -f (Get-ChildItem -path $d.fullname -recurse | where {$_.psIsContainer -ne $true}).count,$d.fullname >> file_counts.txt }





                                                                                  share|improve this answer


























                                                                                    1












                                                                                    1








                                                                                    1







                                                                                    Try this powershell script if you want to list the number of files in each directory from your current location...



                                                                                    $dirs = Get-ChildItem -recurse | Where{$_.psIsContainer -eq $true} ; ForEach($d in $dirs){ "{0,6} | {1,-1}" -f (Get-ChildItem -path $d.fullname -recurse | where {$_.psIsContainer -ne $true}).count,$d.fullname >> file_counts.txt }





                                                                                    share|improve this answer













                                                                                    Try this powershell script if you want to list the number of files in each directory from your current location...



                                                                                    $dirs = Get-ChildItem -recurse | Where{$_.psIsContainer -eq $true} ; ForEach($d in $dirs){ "{0,6} | {1,-1}" -f (Get-ChildItem -path $d.fullname -recurse | where {$_.psIsContainer -ne $true}).count,$d.fullname >> file_counts.txt }






                                                                                    share|improve this answer












                                                                                    share|improve this answer



                                                                                    share|improve this answer










                                                                                    answered Nov 11 '14 at 18:39









                                                                                    DaveAlgerDaveAlger

                                                                                    1165




                                                                                    1165























                                                                                        0














                                                                                        You could just use xcopy with the /T and /E option to copy only directories. That would get you a complete and browsable copy of the structure, and answers the first part of your question. Does not let you view files though...






                                                                                        share|improve this answer




























                                                                                          0














                                                                                          You could just use xcopy with the /T and /E option to copy only directories. That would get you a complete and browsable copy of the structure, and answers the first part of your question. Does not let you view files though...






                                                                                          share|improve this answer


























                                                                                            0












                                                                                            0








                                                                                            0







                                                                                            You could just use xcopy with the /T and /E option to copy only directories. That would get you a complete and browsable copy of the structure, and answers the first part of your question. Does not let you view files though...






                                                                                            share|improve this answer













                                                                                            You could just use xcopy with the /T and /E option to copy only directories. That would get you a complete and browsable copy of the structure, and answers the first part of your question. Does not let you view files though...







                                                                                            share|improve this answer












                                                                                            share|improve this answer



                                                                                            share|improve this answer










                                                                                            answered Mar 16 '11 at 12:07









                                                                                            GomibushiGomibushi

                                                                                            20114




                                                                                            20114























                                                                                                0














                                                                                                You could use an archiving tool, such as WinZIP that can zip an entire directory structure into a single file, that you can, for example, transfer on a network, or put on a USB disk. Some tools will also keep flags such as read-only, archive, etc.



                                                                                                Under Linux, my favorite tool for such action is tar, that will take an entire directory structure into a single file, which I can couple with gzip to actually compress the whole thing.






                                                                                                share|improve this answer




























                                                                                                  0














                                                                                                  You could use an archiving tool, such as WinZIP that can zip an entire directory structure into a single file, that you can, for example, transfer on a network, or put on a USB disk. Some tools will also keep flags such as read-only, archive, etc.



                                                                                                  Under Linux, my favorite tool for such action is tar, that will take an entire directory structure into a single file, which I can couple with gzip to actually compress the whole thing.






                                                                                                  share|improve this answer


























                                                                                                    0












                                                                                                    0








                                                                                                    0







                                                                                                    You could use an archiving tool, such as WinZIP that can zip an entire directory structure into a single file, that you can, for example, transfer on a network, or put on a USB disk. Some tools will also keep flags such as read-only, archive, etc.



                                                                                                    Under Linux, my favorite tool for such action is tar, that will take an entire directory structure into a single file, which I can couple with gzip to actually compress the whole thing.






                                                                                                    share|improve this answer













                                                                                                    You could use an archiving tool, such as WinZIP that can zip an entire directory structure into a single file, that you can, for example, transfer on a network, or put on a USB disk. Some tools will also keep flags such as read-only, archive, etc.



                                                                                                    Under Linux, my favorite tool for such action is tar, that will take an entire directory structure into a single file, which I can couple with gzip to actually compress the whole thing.







                                                                                                    share|improve this answer












                                                                                                    share|improve this answer



                                                                                                    share|improve this answer










                                                                                                    answered Mar 16 '11 at 12:18









                                                                                                    jfmessierjfmessier

                                                                                                    1,90542131




                                                                                                    1,90542131























                                                                                                        -1














                                                                                                        I found the easiest way going to command prompt and entering (in my case I needed the K: directory)



                                                                                                        tree K: > tree.doc


                                                                                                        I chose a Word document since I needed something user friendly. Just select MS-Dos when opening it in Word and it'll look great.






                                                                                                        share|improve this answer




























                                                                                                          -1














                                                                                                          I found the easiest way going to command prompt and entering (in my case I needed the K: directory)



                                                                                                          tree K: > tree.doc


                                                                                                          I chose a Word document since I needed something user friendly. Just select MS-Dos when opening it in Word and it'll look great.






                                                                                                          share|improve this answer


























                                                                                                            -1












                                                                                                            -1








                                                                                                            -1







                                                                                                            I found the easiest way going to command prompt and entering (in my case I needed the K: directory)



                                                                                                            tree K: > tree.doc


                                                                                                            I chose a Word document since I needed something user friendly. Just select MS-Dos when opening it in Word and it'll look great.






                                                                                                            share|improve this answer













                                                                                                            I found the easiest way going to command prompt and entering (in my case I needed the K: directory)



                                                                                                            tree K: > tree.doc


                                                                                                            I chose a Word document since I needed something user friendly. Just select MS-Dos when opening it in Word and it'll look great.







                                                                                                            share|improve this answer












                                                                                                            share|improve this answer



                                                                                                            share|improve this answer










                                                                                                            answered May 14 '14 at 16:40









                                                                                                            GeekSqueakGeekSqueak

                                                                                                            1




                                                                                                            1

















                                                                                                                protected by Community Dec 24 '16 at 11:09



                                                                                                                Thank you for your interest in this question.
                                                                                                                Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                                                                                Would you like to answer one of these unanswered questions instead?



                                                                                                                Popular posts from this blog

                                                                                                                Plaza Victoria

                                                                                                                Brian Clough

                                                                                                                Cáceres