put file list into an editable text file

Joined
Feb 21, 2007
Messages
21
Reaction score
0
Points
1
How do I get Finder to paste a file listing into a text file? I want to do the DOS equivalent of pipelining a "dir" command as in,

dir *.* > list.txt

I want to end up with a text (any format will do) file that is editable so I can include the file listing in a document.

Thanks
 
Joined
Feb 6, 2005
Messages
1,551
Reaction score
102
Points
63
Location
Chicago
Your Mac's Specs
MacBook Pro M1 • iPhone 14 Pro • iPad Pro • iMac Retina 27"
You can open the Terminal (Applications -> Utilities -> Console) and run the following UNIX command from the directory you want to list:

ls > list.txt

You can then do whatever you want with that file.

Good luck!
 
OP
R
Joined
Feb 21, 2007
Messages
21
Reaction score
0
Points
1
Yes, I'm rusty at Unix but did know I could do the same as in DOS. I was really wondering if there was a way to do this from Finder but there doesn't appear to be. (Maybe an Automator process to cut and paste filenames into a text file, but needlessly complicated I suppose.)

There isn't a way to do this equivalent in Windows using Explorer either. Odd, I can't be the only person that's ever needed to do this. It was a handy way to build DOS BAT scripts that did something to a group of files but the only way that I ever found to do it was the DOS pipeline. Oh well.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top