Page 1 of 1

Saving to /mnt/ directory

Posted: Sat Jul 14, 2012 10:09 pm
by bqsbarbqGAnC5Z
Hi Everyone,

I've been reading a lot of stuff about saving a txt file to the SD card and whatnot, but I'm not quite sure how to save to my phone memory since I don't have an SD card in my phone.

Ive been using

Code: Select all

put the cVariable of this stack into url("file:" & specialFolderPath("mnt/sdcard") & "/filename.txt")
but I whenever I run this, a file is never created in this directory, or any other directory I try. I chose mnt/sdcard because it seemed to be the default folder in my phone. Anyone have any suggestions that I can try?

Thanks for reading!

Re: Saving to /mnt/ directory

Posted: Mon Jul 16, 2012 5:32 pm
by Cool Dave
Hi,

Have you tried specialfolderpath("documents") ? According to my research, that should be the folder for application data.

If that doesn't work, look up specialfolderpath in the dictionary, if you haven't already. I'd like to know if "documents" doesn't do it.

All the best,
Dave

Re: Saving to /mnt/ directory

Posted: Mon Jul 16, 2012 11:30 pm
by jacque
SpecialFolderPath gives access to certain specific system folders as listed in the dictionary. The location you want to write to isn't in that list, so you can't use specialFolderPath. Just use the file path by itself:

put the cVariable of this stack into url ("file:/mnt/sdcard/filename.txt")

I'm not positive that's the right path exactly but it's the right idea.

Re: Saving to /mnt/ directory

Posted: Thu Jul 19, 2012 4:30 am
by bqsbarbqGAnC5Z
Hm, thanks for the posts guys but neither of these seemed to have solved my problem. Still can't get any txt files to write to my memory. I'm going to keep playing with it and report back if I make any progress.

Re: Saving to /mnt/ directory

Posted: Fri Jul 20, 2012 2:00 pm
by BvG
Most likely your path to the folder on your drive is wrong. To find the correct path, try this:

Code: Select all

on mouseUp
  answer folder ""
  put it
end mouseUp

Re: Saving to /mnt/ directory

Posted: Sun Jul 22, 2012 11:37 am
by Mark
Hi,

Are you sure that answer folder works on mobile devices?

Mark

Re: Saving to /mnt/ directory

Posted: Mon Jul 23, 2012 4:18 pm
by BvG
oh... no idea, i always forget to check which forum a topic is in :)

Re: Saving to /mnt/ directory

Posted: Fri Jul 27, 2012 1:52 pm
by Klaus
No, this does NOT work on mobile devices.