TidBITS TidBITS TidBITS Talk 
Getting Finder info of many files into text format Jerry Nilson - 03:54am Nov 5, 2008 PSTHi, Just wonder if anyone knows of a way to get into text format the information from the contents of a folder of files and folders, including file name; modification date; size; file type; etc. I know you can easily generate a list of file/folders names in BBEdit/TextWrangler. I can also search and find info and arrange it by these attributes with EasyFind, but one cannot even print from that software and it is difficult to even copy any file names from it. (The Finder itself does not always work for this.) Any thoughts -- seems like there ought to be something out there as so many people would obviously need it ...... ? /Jerry
Mark as Read
Matt Neuburg (apparently)
-
Nov 6, 2008 5:47 am
(#1 Total: 19)
|
 |
|
|
 |
| Posts: 2661 |
Re: Getting Finder info of many files into text format
On or about 11/5/08 2:54 AM, thus spake "Jerry Nilson" <jn  netserv.se>:
> Just wonder if anyone knows of a way to get into text format the information
> from the contents of a folder of files and folders, including file name;
> modification date; size; file type
Everyone who knows AppleScript knows of a way! :) m.
--
matt neuburg, phd = matt  tidbits.com, http://www.tidbits.com/matt/
|
|
 |  |
Alexander Hoffman (apparently)
-
Nov 6, 2008 5:47 am
(#2 Total: 19)
|
 |
|
|
 |
| Posts: 185 |
Re: Getting Finder info of many files into text format
>Just wonder if anyone knows of a way to get into text format the
>information from the contents of a folder of files and folders,
>including file name; modification date; size; file type; etc.
If you just want filenames, you can highlight them in the finder and
copy/paste.
You, however, want more than that.
One thing you can do is use terminal and pipe the info into a file.
A) Load up the Terminal application.
B) Navigate to the directory you are interested in, using the 'cd'
command. For example, 'cd Downloads.' (You can type in 'cd ' and then
drag the folder you are interested in onto the the Terminal window.
It'll paste the path to the folder, so you can just hit enter and
work from there.
C) list the file info on screen to make sure it is what you want. 'ls
-op' is the command I use, but there are variants of it. Type in in
'man ls' to get the list of options, if you want to.
D) pipe it to a text file. You do this with the '>' character and the
file name. For example, 'ls -op > filename.txt'
I think that you might want 'ls -opTR >files.txt'. This a) leaves
out group ID, b) puts a slash after directory names, c) gives you the
full time/date stamp, d) rescursively includes subdirectories.)
Unfortunately, I don't see a way to get the file types listed this
way. Surely, there is another way, though.
--
=Alex Hoffman
|
|
 |  |
Lewis Butler (apparently)
-
Nov 6, 2008 5:47 am
(#3 Total: 19)
|
 |
|
|
 |
| Posts: 1136 |
Re: Getting Finder info of many files into text format
On 5-Nov-2008, at 03:54, Jerry Nilson wrote:
> Just wonder if anyone knows of a way to get into text format the
> information from the contents of a folder of files and folders,
> including file name; modification date; size; file type; etc.
ls -lsh | bbedit
> Any thoughts -- seems like there ought to be something out there as
> so many people would obviously need it ...... ?
I can't think why many people would need this. I use my computer
10-15 hours a day and I can count on my hands the number of times I've
needed a list that was more than just file names, and copy-paste works
just fine for that.
|
|
 |  |
Jon Cohn (apparently)
-
Nov 6, 2008 5:47 am
(#4 Total: 19)
|
 |
|
|
via email - Sprint Application Developer |
|
|
 |
| Posts: 7 |
Re: Getting Finder info of many files into text format
Sounds like you want to use terminal, but there should be ways of doing this with AppleScript too.
As a Unix person, I would go to the "Terminal" app and run the "ls -l > some_file_name.txt" After the -l you can specify a path name such as "/users/joesmith/desktop/"
You can look at all the options of the "ls" command by using the "man ls" command.
Jonathan Cohn
|
|
 |  |
Nigel Stanger (apparently)
-
Nov 6, 2008 5:47 am
(#5 Total: 19)
|
 |
|
|
via email - Dunedin, New Zealand |
|
|
 |
| Posts: 448 |
Re: Getting Finder info of many files into text format
On 5/11/2008 11:54 PM, "Jerry Nilson" <jn  netserv.se> spake thus:
> Just wonder if anyone knows of a way to get into text format the information
> from the contents of a folder of files and folders, including file name;
> modification date; size; file type; etc.
It doesn't do all that you want, but there's a command-line utility called
GetFileInfo (case-sensitive) that I think comes with the developer tools.
For example:
% GetFileInfo qform.xml
file: "/Users/nstanger/qform.xml"
type: ""
creator: ""
attributes: avbstclinmedz
created: 11/16/2007 16:17:23
modified: 04/17/2008 09:31:53
ls -s will give you the file sizes in bytes, or ls -sk for KB. Add -1 to get
single-column output. ls -lh will give you a long listing with "friendly"
file sizes.
% ls -s qform.xml
8 qform.xml
% ls -sk qform.xml
4 qform.xml
% ls -lh qform.xml
-rw-r--r-- 1 nstanger nstanger 343B 17 Apr 2008 qform.xml
The other option would be to use AppleScript to extract the information and
drop it into BBEdit, but I'm not sure how much of the file info is exposed
by the Finder.
Hope that helps.
--
Nigel Stanger, Dunedin, NEW ZEALAND.
http://xri.net/=nigel.stanger
|
|
 |  |
David Weintraub (apparently)
-
Nov 6, 2008 5:47 am
(#6 Total: 19)
|
 |
|
|
 |
| Posts: 270 |
Re: Getting Finder info of many files into text format
How geeky do you want to get?
You can always go to the Unix command line and use the "ls -l"
command. That would give you the file name, modification date, size,
owner, and permissions in the current directory. If you have a lot of
files, you can redirect the output of the 'ls' command into a file:
$ ls -l > listings.txt
Then, you can use TextEdit to examine the output file.
Pathfinder, I believe, can print out this information, but I have
never tried it in Pathfinder.
I wonder if Automator can help. I've tried it a few times, but the
stuff I want to automate aren't scriptable.
--
David Weintraub
qazwart  gmail.com
|
|
 |  |
John C. Welch (apparently)
-
Nov 6, 2008 1:37 pm
(#7 Total: 19)
|
 |
|
|
 |
| Posts: 862 |
Re: Getting Finder info of many files into text format
On 11/6/08 7:47 AM, "Alexander Hoffman" <ahoffman  aledev.com> wrote:
> Unfortunately, I don't see a way to get the file types listed this
> way. Surely, there is another way, though.
As Matt said, AppleScript.
--
John C. Welch
|
|
 |  |
John C. Welch (apparently)
-
Nov 6, 2008 1:37 pm
(#8 Total: 19)
|
 |
|
|
 |
| Posts: 862 |
Re: Getting Finder info of many files into text format
On 11/6/08 7:47 AM, "Nigel Stanger" <NStanger  infoscience.otago.ac.nz>
wrote:
>
> The other option would be to use AppleScript to extract the information and
> drop it into BBEdit, but I'm not sure how much of the file info is exposed
> by the Finder.
Information returned by the "Info For" command from Standard Additions (No
Finder needed for this):
alias
bundle identifier
busy status
creation date
default application
displayed name
extension hidden
file creator
file type
folder
folder window
kind
locked
long version
modification date
name
name extension
package folder
short name
size get integer the size of the item in bytes
type identifier
visible
Finder information for a file from AppleScript:
bounds
class
comment
container
creation date
creator type
description
desktop position
disk
displayed name
everyones privileges
extension hidden
file type
group
group privileges
icon
index
information window
kind
label index
locked
modification date
name
name extension
owner
owner privileges
physical size
position
product version
properties
size
stationery
URL
version
Finder information for an application adds to the file info (the last 4 are
for 10.1 to 10.4 only):
has scripting terminology
id
minimum size
opens in Classic
preferred size
suggested size
Was there anything else required?
--
John C. Welch
|
|
 |  |
norm.bzr
-
Nov 6, 2008 1:37 pm
(#9 Total: 19)
|
 |
|
|
 |
| Posts: 14 |
Re: Getting Finder info of many files into text format
You might like to take a look at CDfinder - I think it has an export function that will do what you want - though I have not used it
Norm Beazer
|
|
 |  |
Nigel Stanger (apparently)
-
Nov 6, 2008 1:37 pm
(#10 Total: 19)
|
 |
|
|
via email - Dunedin, New Zealand |
|
|
 |
| Posts: 448 |
Re: Getting Finder info of many files into text format
On 7/11/2008 1:47 AM, "David Weintraub" <qazwart  gmail.com> spake thus:
> Pathfinder, I believe, can print out this information
Oh, so it can! Wow, File > Reports > Selected Items creates what looks like
an RTF document containing every single piece of metadata that the computer
has on the selected items (see below for an example). Unfortunately it lists
each item individually rather than as a convenient table, but the formatting
is consistent, so it wouldn't be too hard to reorganise it.
Display Name: DSC00310.JPG
Name: DSC00310.JPG
Path: /Users/nstanger/Downloads/DSC00310.JPG
URL: file://localhost/Users/nstanger/Downloads/DSC00310.JPG
Kind: JPEG image
Size: 2,614,436 bytes
Data Fork Size: 2,614,436 bytes logical, 2,617,344 bytes physical
Resource Fork Size: 0 bytes logical, 0 bytes physical
Type: ''
Creator: ''
Permissions: -rwxrwxrwx (777)
Owner: 502 - nstanger
Group: 502 - nstanger
Creation Date: Mon, 4 Dec 2006, 5:14PM
Modification Date: Mon, 4 Dec 2006, 5:14PM
Attribute Modification Date: Fri, 15 Feb 2008, 1:20PM
Access Date: Fri, 7 Nov 2008, 8:33AM
Backup Date:
Volume: NO
Directory: NO
Package: NO
Application: NO
[... and so on for another three pages or so, because this is a JPEG
with additional EXIF metadata. Typical files are more like a couple
of pages of metadata. ]
--
Nigel Stanger, Dunedin, NEW ZEALAND.
http://xri.net/=nigel.stanger
|
|
 |  |
solentmike (apparently)
-
Nov 8, 2008 4:52 am
(#11 Total: 19)
|
 |
|
|
 |
| Posts: 1 |
Re: Getting Finder info of many files into text format
Accidentally stumbled on a way a few days ago - drag a folder from
Finder and drop it into Firefox, bingo - it lists the folders
content. Now you can print it, PDF it, do whatever you like with it.
|
|
 |  |
quadrat (apparently)
-
Nov 9, 2008 2:37 am
(#12 Total: 19)
|
 |
|
|
 |
| Posts: 2 |
Re: Getting Finder info of many files into text format
>Posted by: solentmike Date: Nov 8, 2008.
>
>Accidentally stumbled on a way a few days ago - drag a folder from
>Finder and drop it into Firefox, bingo - it lists the folders
>content. Now you can print it, PDF it, do whatever you like with it.
Works with Camino, too. Open a new window, or tab, and drag the folder in.
Not very elegant, but it is a file listing.
--
David Vereschagin, Quadrat Communications
< http://www.quadrat.com/>
|
|
 |  |
Jerry Nilson
-
Nov 12, 2008 12:54 am
(#13 Total: 19)
|
 |
|
|
 |
| Posts: 4 |
Re: Getting Finder info of many files into text format
Hi, cool! I did not see there was an answer until I read TidBITS today ... . Thanks! I received another tip on how to use the Terminal for the task also, but being very used to go the GUI way if there is a possibility to do so, this is great! /Jerry
|
|
 |  |
Jerry Nilson
-
Nov 12, 2008 12:54 am
(#14 Total: 19)
|
 |
|
|
 |
| Posts: 4 |
Re: Getting Finder info of many files into text format
Well, It does not show the contents of subfolders ... so a bit similar to TextWrangler/BBEdit ... . /Jerry
|
|
 |  |
GS.Sunatori
-
Nov 13, 2008 7:52 am
(#15 Total: 19)
|
 |
|
|
 |
| Posts: 1 |
Re: Getting Finder info of many files into text format
Automator.app has some potential. I quickly put together "Ask for Finder items", followed by "Get Folder Contents", followed by "New Text File". The workflow produces a text file with files names in a specified folder OK. There may be a way to add more information.
|
|
 |  |
Jerry Nilson
-
Nov 13, 2008 7:52 am
(#16 Total: 19)
|
 |
|
|
 |
| Posts: 4 |
Re: Getting Finder info of many files into text format
Hi, We did a find command in the terminal as we only wanted to search out the exact file paths to all files on the server that was of the type .mbox
(Finder could not search the files due to some permissions problem I think.) /Jerry
|
|
 |  |
David Weintraub (apparently)
-
Nov 14, 2008 2:39 am
(#17 Total: 19)
|
 |
|
|
 |
| Posts: 270 |
Re: Getting Finder info of many files into text format
On Thu, Nov 13, 2008 at 9:52 AM, Jerry Nilson <jn  netserv.se> wrote:
> Hi, We did a find command in the terminal as we only wanted to search out the exact file paths to all files on the server that was of the type .mbox (Finder could not search the files due to some permissions problem I think.) /Jerry
Man, if that is what you wanted, why didn't you just ask:
$ find . -name "*.mbox" -ls
That will drill down into all sub-folders finding any file with a
suffix of .mbox, and then prints out the permissions, owner, group,
last modified date, size, and of course, the name of the file.
--
David Weintraub
qazwart  gmail.com
|
|
 |  |
cyroton
-
Nov 14, 2008 2:46 am
(#18 Total: 19)
|
 |
|
|
 |
| Posts: 2 |
Re: Getting Finder info of many files into text format
An application called, Print Window may do what you need. Print Window is a utility for generating and printing file listings directly from the Mac OS X Finder. One can create file listings with some amount of control over what is printed and how it looks. File listings can be generated for a single folder, a variety of subfolders or even entire disks.
Print Window is available in two versions, both accessible from the same application. The
Standard version is available for use, free of charge. It contains many features for generating file listings. The Advanced version is available to those who purchase a serial number, and provides many more options.
You can select the number of columns for the print when only filenames are to be listed.
Print to PDF, and then you can copy the text from the pdf and paste into a word processor for editing.
|
|
 |  |
Dave Scocca (apparently)
-
Nov 15, 2008 5:27 am
(#19 Total: 19)
|
 |
|
|
 |
| Posts: 111 |
Re: Getting Finder info of many files into text format
--On 11/14/2008 1:39 AM -0800 David Weintraub wrote:
> On Thu, Nov 13, 2008 at 9:52 AM, Jerry Nilson <jn  netserv.se> wrote:
>> Hi, We did a find command in the terminal as we only wanted to search
>> out the exact file paths to all files on the server that was of the type
>> .mbox (Finder could not search the files due to some permissions problem
>> I think.) /Jerry
>
> Man, if that is what you wanted, why didn't you just ask:
>
> $ find . -name "*.mbox" -ls
>
> That will drill down into all sub-folders finding any file with a
> suffix of .mbox, and then prints out the permissions, owner, group,
> last modified date, size, and of course, the name of the file.
You may want to prefix this with "sudo", if you need to search folders to
which the current user does not have read permission.
Dave
|
|
|
TidBITS TidBITS TidBITS Talk Getting Finder info of many files into text format
|
|