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

satyen20

macrumors newbie
Original poster
Sep 23, 2008
6
0
Hi All,
I have about 100 files in a folder (not a specific file type -- I found a Macro for word but it only recognized doc files). I want to get the times they were created and modified (for ex: created at 04:30:07 and modified at 04:41:59) and put them in a text file. Does anyone know how I can achieve this?
I appreciate your hellp!
SR.
 
In Terminal, run

ls -l [drag the folder into the Terminal window] > ~/Desktop/list.txt

A file named list.txt should appear on your desktop. You'll get a bunch of extra trash, but the info you're looking for will be there.
 
In Terminal, run

ls -l [drag the folder into the Terminal window] > ~/Desktop/list.txt

A file named list.txt should appear on your desktop. You'll get a bunch of extra trash, but the info you're looking for will be there.

Thanks for such a quick reply!
 
No problem. If you run man ls you'll see more details on the command you're using. Instead of just -l you could try adding flags like t (sort by time modified), c (display last changed date rather than created), and/or h (human-readable file sizes in kilobytes, megabytes, etc) to the end of -l.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.