Keeping a record of items in a folder?

iVikD

macrumors regular
Original poster
Sep 11, 2011
227
11
Spain
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...)
 

r.j.s

Moderator emeritus
Mar 7, 2007
15,026
35
Texas
Terminal should be able to do it - I think the command is "ls" without the "

Then copy/paste into a text file.
 
Comment

MimiHome

macrumors newbie
Jun 8, 2012
27
0
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!
 
Comment

iVikD

macrumors regular
Original poster
Sep 11, 2011
227
11
Spain
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
 
Comment

GGJstudios

macrumors Westmere
May 16, 2008
44,427
763
  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
 
Comment

r.j.s

Moderator emeritus
Mar 7, 2007
15,026
35
Texas
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
Automator should be able to do that for you.
 
Comment

iVikD

macrumors regular
Original poster
Sep 11, 2011
227
11
Spain
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
 
Comment

GGJstudios

macrumors Westmere
May 16, 2008
44,427
763
Here's another dumb question: How can I navigate to a folder inside my external drive and run the same ls command?
The alternate method I posted doesn't require Terminal commands and will work on any drive.
 
Comment

iVikD

macrumors regular
Original poster
Sep 11, 2011
227
11
Spain
The alternate method I posted doesn't require Terminal commands and will work on any drive.
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?
 
Comment

r.j.s

Moderator emeritus
Mar 7, 2007
15,026
35
Texas
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?
You can, but I can't remember the commands ... a quick google of "osx terminal commands" should help you out though.
 
Comment

GGJstudios

macrumors Westmere
May 16, 2008
44,427
763
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?
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
 
Comment

iVikD

macrumors regular
Original poster
Sep 11, 2011
227
11
Spain
Perfect. You guys have been wonderful, thank you so much =]
 
Comment

iVikD

macrumors regular
Original poster
Sep 11, 2011
227
11
Spain
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
 

Attachments

Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.