Thanks Dominic and John. After playing around with it a little, the type attribute must be "TEXT". I guess I can just do a call to system () to set this. Thank you for your help.

Joe.

[PowerBook-G4:~/Desktop] jja% /Developer/Tools/GetFileInfo c.txt
file: "/Users/jja/Desktop/c.txt"
type: ""
creator: ""
attributes: avbstclinmedz
created: 06/01/2006 17:58:50
modified: 06/08/2006 11:42:04
[PowerBook-G4:~/Desktop] jja% /Developer/Tools/SetFile -t "TEXT" c.txt
[PowerBook-G4:~/Desktop] jja%


On Jun 8, 2006, at 11:05 AM, Dominic Dunlop wrote:

On 2006–06–08, at 17:20, Joseph Alotta wrote:

I am trying to read a CSV data file of names and addresses into Now Contact. However the import feature does not see this file as it is ghosted. My conclusion is that it is looking at the file creator information.

How do I see this information? Apple-i, Get Info, does not show this. How can I inspect these file attributes and how can I modify them with perl?

Firstly, I'd try giving the files a ".txt" extension. That might persuade Now Contact of their acceptability.

If that doesn't work, you need the to use the MacPerl module:

$ perl -MMacPerl -lwe 'print join " ", MacPerl::GetFileInfo ("Desktop/random.tif")'
GKON TIFF

The corresponding interface to set the signature is MacPerl::FSpSetFInfo -- see the man page for details. (Although MacPerl is part of the Tiger essentials package, you have to load the optional BSD package to get the man page. But, as a Perl developer, you'll have done that.)

Finally, if this is a one-off job, you can do things by hand with the GetFileInfo and SetFile utilities from Apple's developer tools. They live in /Developer/Tools. Again, see the man pages for details.
--
Dominic Dunlop


Reply via email to