Jump to content

Program to export file AND sub-directory names


Attol

Recommended Posts

We have many many external hard drives and I want to make an excel file of all the directories and sub directories so need the names exported to a txt or cdv or..

I found through terminal I can get the ls command to give me the directory names but I want ALL the subs and their subs..

I know I can cut and some kind of special paste in a txt doc too but again looking for the entire list of all folders names.

Any apps? I have searched online and mac forums and no solution. Willing to Pay so any suggestions appreciated.

Link to comment
Share on other sites

To find all the files on shell (command line) use "find" command

Manual page will give you all the options

$ man find

List all the files, directories and subdirectories on /Volumes/foo and put them to file named all-files.txt

$ find /Volumes/foo > all-files.txt

Only directories

$ find /Volumes/foo -type d > directories.txt

If you wish to use ls command (man ls for options)

$ ls -R /Volumes/foo > all-files-with-recursive-ls.txt

Link to comment
Share on other sites

Yep, in the terminal. Overall if there is dollar sign, it means shell command. Don't write the $-sign itself. (For privileged commands, some use "$ sudo" at the start of the command, myself use "#" which means that the shell is using root-privileges.

First however you need to check the name/mountpoint of the inserted disk / volume you are going to use. (/Volumes/foo). The foo was an example in this case.

This you can get either from the Finder or from the command line.

$ df -h

or

$ mount

Link to comment
Share on other sites

That should be the correct command, if your external disk is mounted as /Volumes/mydirectory

Did you get any error messages?

If you open the all-files.txt with an text editor is there anything inside?

You can also try "find /Volumes/mydirectory | more" which will print the found files to the terminal. While watching the files, Press space to go to the next page and "q" to quit.

Link to comment
Share on other sites

Check out NeoFinder. I use it to catalogue music across multiple drives. Cant see a print/export function, .... scratch that, can export to text file ... but end result looks messy - might need to play around a bit.

Free version lets you catalogue 10 drives.

Took me ages to find something that could do this.

  • Like 1
Link to comment
Share on other sites


ls -alR > blah.txt

well knowing what exactly you want accomplish with the output would help alot, as iam sure there are much better solutions than flipping spreadsheets
Link to comment
Share on other sites

thanks for suggestions. Not sure Neo Finder is what i need.. Search function on spreadsheets would be perfect..

Multiple hard drives with professional images need to be catalog by FOLDER name. I want to create a directory of Hard drives 1 -10

The existing folder names are good and descriptive but there are so many hard drives.

Finding one folder for example .. food from Patong.. impossible as there are 10 hard drives with gigantic files.
Even though somewhere in a folder called Thailand, with a sub-directory called Phuket with a sub-directory of that called Patong with a subdirectory called Food exist.

However if a program could read all the folder names and I could import them in a spread/txt file then I could easily search a whole excel work book for Patong Beach, food. One page for each hard drive. Or a better solution..

Any and all suggestions appreciated. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.








×
×
  • Create New...