You could,do this with Terminal (bash) commands, if you’re open to that. There is a near-infinite number of ways to gather and format the text.
Open Terminal
cd ~/Documents/yourfolder
stat -f "%N,%z" | pbcopy
cd
changes directory to the folder you’re interested in. ~
is your home folder. In Finder, this would be the house icon with your user name. Then moves into the Documents
folder and yourfolder
stat -f "%N,%z"
prints the file name (%N
), then a comma, then the file size (%z
).
The vertical bar (also called pipe) sends the output of the stat
command to the pasteboard copy command pbcopy
.
Now, switch over to Excel (I assume) and Cmd+V to paste.
If you’re lucky, you’ll get two columns, filenames, and sizes. If it pastes in as one column, use Text to Columns...
in the Data
menu to convert it to separate columns. Choose the comma as the separator. I just did that on my sample data, and Excel remembered it so I didn’t have to do it again for this spreadsheet.
Here’s a sample of what the command produced on my system.
1098-T 2017.pdf,223770
Bookends CheatSheet.pdf,51294
EEG Processing Pipeline.pdf,34134
Jean-Léon Gérôme and Polychrome Sculpture.pdf,371825
Kolbe A Result for John Johnson.pdf,1376239
Misinterpretation of one of Issac Newtons writings.pdf,412847
Vision Statement.pdf,14455
nutsvolts200907-6574c14b81-pp.pdf,395349
For this example, I limited it to only .pdf files in my Documents
folder by using this command: stat -f "%N,%z" *.pdf | pbcopy
And in the spreadsheet:
