At 7:35 pm +0200 8/6/06, Dominic Dunlop wrote:

On 2006–06–08, at 18:46, Joseph Alotta wrote:

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.

Careful! If you use SetFile to do this, you'll end up with a script that works only on systems that have devtools installed...

The file type can also be set like this:

my $f =  "$ENV{HOME}/desktop/trash.csv";
open F, ">$f" or die $!;
print F "a,b,c,d,e";
`osascript -e '
tell app "finder" to set file type of posix file "$f" to "TEXT"
'`;

JD

Reply via email to