At 10:20 am -0500 8/6/06, Joseph Alotta wrote:

Greetings,

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?

Without loading Mac::Carbon you can get (and set) type and creator with osascript in the shell, but it might be quicker (if milliseconds are important) just to print the data to an anonymous file and have NC read that, if it can.


#!/usr/bin/perl
my $csv = "$ENV{HOME}/factory/accounts/2006 accounts/bos_060216.csv";
my $temp_csv = "/tmp/temp.csv";
open CSV, $csv or die $!;
open TEMP, ">$temp_csv" or die $!;
print TEMP <CSV>;
my $type_creator = `
osascript -e '
tell app "Finder" to get {file type, creator type} of (posix file "$csv")
'`;
print "type, creator : $type_creator\n__________\n\n";
close TEMP;
open TEMP, "$temp_csv";
print <TEMP>;

JD

Reply via email to