7 Replies Latest reply: Jan 11, 2013 7:26 PM by softwater
????? ???1 Level 1 Level 1 (5 points)

I have a folder (call it folder A) and inside that about 60 subfolders with 5-50 files in each. Is there anyway I can view all the files in Folder A in the 'flat' ie in one window so I can sort them by creation date, modification etc (obviously, I want to do this without actually moving the files)


MacBook Air, OS X Mountain Lion (10.8.2)
  • 1. Re: How to view all files in subfolders?
    softwater Level 5 Level 5 (5,370 points)

    In Finder, no.

     

    You could use something like this in Terminal

     

    find ~/Desktop/* -ls | open -f

     

    That would open a textedit file with a list of every file in Desktop and all its subdirectories. It would give you the file size, permissions and last modification time as well as its full path. You could then paste that into Excel and sort it how you want.

     

    Obviously, you change ~/Desktop/* to ~/A/* or whatever the folder is called.

  • 2. Re: How to view all files in subfolders?
    ????? ???1 Level 1 Level 1 (5 points)

    Thanks! What I really want is creation date

  • 3. Re: How to view all files in subfolders?
    CT Level 6 Level 6 (15,535 points)

    Maybe it won't work out quite like you want, but you might try this....

     

    Open the folder enclosing folder A.  Go to List VIew.  Option-click on folder A. All the subfolders and their files get revealed. Click on the column which sorts by date.

     

    charlie

  • 4. Re: How to view all files in subfolders?
    ????? ???1 Level 1 Level 1 (5 points)

    OK but what is the way I format a folder name with spaces. It returns a empty file otherwise

  • 5. Re: How to view all files in subfolders?
    softwater Level 5 Level 5 (5,370 points)

    ????? ???1 wrote:

     

    Thanks! What I really want is creation date

     

    OK, use this:

     

    cd ~/Desktop; ls -RU -alF | open -f

     

    This lists the creation date rather than the mod' date.

     

    Here you have to replace Desktop with A (or whatever); keep everything else the same, assuming the folder is sitting in your home directory and isn't a child of some other folder in your home directory (if it is a child of some other folder, see the last two examples below).

     

     

     

    NOTES

    If the folder you want to search has a space in the name, you're going to need to add an escape character - that's a backslash \ - before the space:

     

    e.g.,

     

    Suppose the folder you want to search is in your home directory and is called "My Docs", you'd use

     

    cd ~/My\ Docs; ls -RU -alF | open -f

     

    Whereas if the folder was just called "MyDocs", you'd just use

     

    cd ~/MyDocs; ls -RU -alF | open -f

     

    Suppose My Docs is inside your Documents folder, use

     

    cd ~/Documents/My\ Docs; ls -RU -alF | open -f

     

    Suppose My Docs is inside Work which is inside Documents, use

     

    cd ~/Documents/Work/My\ Docs; ls -RU -alF | open -f

  • 6. Re: How to view all files in subfolders?
    Jeffrey Jones2 Level 6 Level 6 (8,510 points)

    Actually, you can do that in the Finder. Open folder A; type Command-F (File > Find); enter some general search criterion that includes every file, for example, "Created before tomorrow". The default search starts at the folder that was open when you entered the search, so it will list all the files under that.

  • 7. Re: How to view all files in subfolders?
    softwater Level 5 Level 5 (5,370 points)

    Good call!