Creating a folder using get specialFolderPath

Mark Schonewille m.schonewille at economy-x-talk.com
Mon Aug 9 13:39:33 CDT 2010


Hi,

It is not entirely clear to me what you want. Why exactly did you choose to glue specialFolderPath("home") and specialFolderPath("asup") together? Have you actually checked what the two return?

Also, you might need to check that folders actually exist. If they don't exist, create them.

set the itemdel to slash
repeat with x = 2 to number of items of myPath
	if not (there is a folder (item 1 to x of myPath)) then
		create folder (item 1 to x of myPath)
	end if
end repeat

Use the above repeat loop with folder paths only. Temporarily remove the file name from the path if necessary.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

From 15th August, we'll have time for new projects! Be the first in line and contact me now!

Download the Installer Maker plugin for Runtime Revolution at http://qurl.tk/ce

On 9 aug 2010, at 18:08, charles61 wrote:

> 
> I have the following handler that creates a text file (list) on the user's
> application support folder on OS X:
> 
> if the platform = "MacOS" then
>      get specialFolderPath("home") & specialFolderPath("asup") &"/" &
> "list"
>      put it into tfilePath
> end if
> 
> I tried the following to create a folder in the user's application support
> folder that would store the text file (list):
> 
> if the platform = "MacOS" then
>      get specialFolderPath("home") & specialFolderPath("asup") &"/" &
> "Student Report" & "/" & "list"
>      put it into tfilePath
> end if
> 
> But it does not work? Any suggestions?




More information about the use-livecode mailing list