Comma-Delimited Files on Macs

Richard Gaskin ambassador at fourthworld.com
Sat Sep 17 18:06:41 EDT 2011


Gregory Lypny wrote:

> When I create comma-delimited files with LiveCode by running handlers such as
>
> 	repeat with i=1 to 10
> 		 put i & comma & “something” & comma & “more stuff” & return after theData
> 	end repeat
>
> 	put theData into url (“file://“ & filePath)
>
> the file type shows up as Document rather than CSV Document in the Finder’s Get Info window.  Why is that, and is it possible to save as CSV Document?

The Finder doesn't know about the internal structure of a file.  What it 
reports is just what it can derive from the file name extension.

If you change the file name to end in ".csv", the Finder will report it 
as being "comma separated values".

That said, tab-delimited is a better choice.  CSV must die:
<http://www.fourthworld.com/embassy/articles/csv-must-die.html>

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv




More information about the use-livecode mailing list