Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rf2209

macrumors newbie
Original poster
Nov 26, 2014
2
0
Hi,

I have previously used windows and am starting out with a mac, for a project I am working on I require an output text or spreadsheet file that shows the following:

all folders, sub folders and files on a certain volume in a list with the parameters of last opened or lost modified before 1 Jan 2013

I started in automator but couldn't work out how to control the parameters so have moved to applescript but Im struggling.

Any help much appreciated
 

superscape

macrumors 6502a
Feb 12, 2008
937
223
East Riding of Yorkshire, UK
Personally, I'd take a look at the command line "find" command. Open up your Terminal and type:

man find

...to see the manual pages for "find". For example, if you're interested in listing all files in a folder located at /Library/Preferences then you'd use the command:

Code:
find /Library/Preferences -type f
The '-type f' bit tells find that we're only interested in files. Filtering by file age can be fiddly, but it's doable. Look at the man pages for options (specifically 'time'). There's a good discussion of finding files by date here:

Code:
http://www.unix.com/tips-and-tutorials/20526-mtime-ctime-atime.html
Once you're happy with the results you're getting, you can write these to a file like this:

Code:
find /Library/Preferences -type f > ~/Desktop/results.txt

Hope that's of some help!
 

briloronmacrumo

macrumors 6502a
Jan 25, 2008
533
341
USA
Disk usage ( du ) command can be helpful. Output can be redirected to a file per Superscape's last code post.

List files and sizes for Library caches:
Code:
sudo du -sh /System/Library/Caches/*

redirecting results to a file:
Code:
sudo du -sh /System/Library/Caches/* > ~/Desktop/results.txt

btw: du does not require sudo but some directories might require authentication.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.