Skip navigation

How to view all files in subfolders?

621 Views 7 Replies Latest reply: Jan 11, 2013 7:26 PM by softwater RSS
????? ???1 Calculating status...
Currently Being Moderated
Jan 11, 2013 6:17 AM

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)
  • softwater Level 5 Level 5 (5,370 points)
    Currently Being Moderated
    Jan 11, 2013 6:50 AM (in response to ????? ???1)

    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.

  • CT Level 6 Level 6 (14,985 points)
    Currently Being Moderated
    Jan 11, 2013 6:56 AM (in response to ????? ???1)

    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

  • softwater Level 5 Level 5 (5,370 points)
    Currently Being Moderated
    Jan 11, 2013 7:22 AM (in response to ????? ???1)

    ????? ???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

  • Jeffrey Jones2 Level 6 Level 6 (8,425 points)
    Currently Being Moderated
    Jan 11, 2013 5:42 PM (in response to ????? ???1)

    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.

  • softwater Level 5 Level 5 (5,370 points)
    Currently Being Moderated
    Jan 11, 2013 7:26 PM (in response to Jeffrey Jones2)

    Good call!

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.