-
All replies
-
Helpful answers
-
Jul 26, 2014 6:16 PM in response to occassiaby Niel,Open the AppleScript Editor in the /Applications/Utilities/ folder and run the following exactly as posted:
set the_string to ""
tell application "Finder"
repeat with this_item in (get items of (choose folder))
set the_string to the_string & name of this_item & tab & modification date of this_item & tab & size of this_item & tab & kind of this_item & return
end repeat
end tell
Paste the result into the word processor.
(110029)
-
Jul 26, 2014 6:39 PM in response to Nielby occassia,Nifty! I'm assuming that (choose folder) should be replaced with (folder name) —with or without parens?
-
Jul 26, 2014 6:41 PM in response to occassiaby Barney-15E,There are third-party programs that do this. I think Print Folder is one. I’ve never used it.
You can also create an automator action to print the details from the command line.
Create a new Service and set it up like this:
The shell script is this:
ls -ohkFRT Documents | awk '{print$9"\t"$4"\t" $5, $6", "$8, $7}'If you don’t want to recursively list the subdirectory contents, remove the R, like this:
ls -ohkFT Documents | awk '{print$9"\t"$4"\t" $5, $6", "$8, $7}'If you don’t want to see the / after folders and the * for executables, remove the F, like this:
ls -ohkRT Documents | awk '{print$9"\t"$4"\t" $5, $6", "$8, $7}'Save the Service as Print Folder Contents (or anything you want). You can ctrl-click on a folder in the Finder and choose Print Folder Contents from the Services menu. This will open a new Text Edit document with the name, size, and date listed in a tab-delimited file.
-
Jul 26, 2014 6:42 PM in response to occassiaby Niel,As I wrote above, run it exactly as posted. This means not replacing 'choose folder' with anything else.
(110035)
-
Jul 26, 2014 6:45 PM in response to Nielby occassia,So cool! Thank you Niel!
Thank you also, Barney. ;-)
-
-
Aug 19, 2014 1:52 PM in response to dougweaver4by Barney-15E,It sounds like you have copied some artifact from the web display, or you missed part of the code.
From Safari, copy/paste of the entire code worked fine. Are you using another browser? It may have inserted something into the lines.
set the_string to "" tell application "Finder" repeat with this_item in (get items of (choose folder)) set the_string to the_string & name of this_item & tab & modification date of this_item & tab & size of this_item & tab & kind of this_item & return end repeat end tell
-
Aug 20, 2014 11:30 AM in response to Barney-15Eby dougweaver4,Thanks... I copied from his reply in Safari and it gave that error, but when I copied from yours in Safari it worked. This will be useful.
BTW, from another forum entry I found an Automator workflow that creates a text file of the file &/or folder names in a folder, but it does not capture the size, date etc, at least as I found it. Link or screenshot available on request. I had some trouble getting it to work as a Service until I figured out something that the OP of it had left off.
-
-
May 19, 2015 2:39 PM in response to Barney-15Eby plutopaul,Thanks for this. I switched off the recursive switch for sub-directories and have it nearly working, save that it doesn't produce a list from the current folder, but always from the root? Any ideas?
