Keeping a record of items in a folder?

Discussion in 'macOS' started by iVikD, Jun 12, 2012.

  1. iVikD macrumors regular

    iVikD

    Joined:
    Sep 11, 2011
    Location:
    Spain
    #1
    Hey guys, my problem is that I'm sort of a cyber hoarder.... I keep a LOT of crap in my internal hard drive XD and I think it's about time to clean out my mac.
    My biggest problem is my Downloads folder, which holds tons of setups, .dmgs, programs, apps, you name it. I wanna move them over to my external, but leave behind a .txt of some sort with the names of the files, that way I can just check IF i have something instead of carrying my external everywhere.... Maybe it's too much to ask, but is there a quick and dirty way of doing this?
    My first thought was to use terminal to get to my download folder and use a command akin to dirs on windows or iOS that would just give me a list of all the names, but that didn't work and I'm not very familiar with OSX commands (shame on me...)
     
  2. r.j.s Moderator emeritus

    r.j.s

    Joined:
    Mar 7, 2007
    Location:
    Texas
    #2
    Terminal should be able to do it - I think the command is "ls" without the "

    Then copy/paste into a text file.
     
  3. MimiHome macrumors newbie

    MimiHome

    Joined:
    Jun 8, 2012
    #3
    Thanks for the tip! I love to save all kinds of things to. I think that I may need it someday, but often times I do not. It is nice to know how to keep record of items. Thanks!
     
  4. iVikD thread starter macrumors regular

    iVikD

    Joined:
    Sep 11, 2011
    Location:
    Spain
    #4
    Thanks! That is EXACTLY what I was looking for... I feel like I should make a script or small app that will automate this... Maybe an action folder script... You know, as my way of leaving something to the community XD
     
  5. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #5
    1. You can also select all items in a folder, then Command-C to copy
    2. Launch TextEdit and Command-Shift-T to change to plain text
    3. Command-V to paste
     
  6. r.j.s Moderator emeritus

    r.j.s

    Joined:
    Mar 7, 2007
    Location:
    Texas
    #6
    Automator should be able to do that for you.
     
  7. iVikD thread starter macrumors regular

    iVikD

    Joined:
    Sep 11, 2011
    Location:
    Spain
    #7
    I'll give it a shot and post it here if I accomplish anything with it. Thanks again!
     
  8. iVikD thread starter macrumors regular

    iVikD

    Joined:
    Sep 11, 2011
    Location:
    Spain
    #8
    Here's another dumb question: How can I navigate to a folder inside my external drive and run the same ls command?
    I've tried cd /Volumes/External, it just goes to a new line headed with a '>'... Doesn't take any commands or give feedback. The external is an exFAT HDD
     
  9. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #9
    The alternate method I posted doesn't require Terminal commands and will work on any drive.
     
  10. iVikD thread starter macrumors regular

    iVikD

    Joined:
    Sep 11, 2011
    Location:
    Spain
    #10
    Of course, you're right. Thanks. However, just for the sake of learning something new, can I actually navigate through an external disk using the terminal? Is the format not supported?
     
  11. r.j.s Moderator emeritus

    r.j.s

    Joined:
    Mar 7, 2007
    Location:
    Texas
    #11
    You can, but I can't remember the commands ... a quick google of "osx terminal commands" should help you out though.
     
  12. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #12
    Yes, you can. If the drive or folder contains a space, just wrap it it double quotes:

    ls /volumes/"external drive"​
    OS X commands OSX Man Page
     
  13. iVikD thread starter macrumors regular

    iVikD

    Joined:
    Sep 11, 2011
    Location:
    Spain
    #13
    Perfect. You guys have been wonderful, thank you so much =]
     
  14. iVikD thread starter macrumors regular

    iVikD

    Joined:
    Sep 11, 2011
    Location:
    Spain
    #14
    Ok, here's my little Automator app that makes a .txt file with the names of the contents of a selected folder... It's my first Automator project, so I'd appreciate any input and criticism... I'd have liked to cut out the whole filepath from the text file, but I don't quite know how... I think the basic Automator is a bit limited... Once I learn a bit more code I'll tackle this with Xcode
     

    Attached Files:

Share This Page