File.SaveFile method currently can't create a folder

1,273 views
Skip to first unread message
Assigned to halab...@google.com by taifu...@gmail.com

Taifun

unread,
Jul 8, 2014, 10:31:11 AM7/8/14
to
@MIT: please add the possibility to create a folder in case it does not exist
see attached example project
see also issue 2796 
Taifun


SaveFile.aia

PeterO

unread,
Dec 27, 2019, 4:53:49 PM12/27/19
to MIT App Inventor Forum
Hi Taifun and all,

I have an app that I wish to publish that requires a folder with a specific name to be created before it can run. At present I'm suggesting to users that they create the folder manually but is it possible to create a specific folder under program control as part of an aia app?

I've tried running your attached blocks but get the error "Error 2103 the File/storage/emulated/0/randomFolder/File1.txt could not be created

Its been a few years since the issue was raised and I've downloaded the latest version of the emulator. Is it possible that the work through doesn't work on the emulator?

I've made the assumption that the blocks you attached are a way for a program to create a folder but is that assumption wrong? Is it impossible for an aia program to create a folder?

Many thanks for any advice, regards, Peter

Taifun

unread,
Dec 27, 2019, 5:53:45 PM12/27/19
to MIT App Inventor Forum
this is a very old thread...
or use the file extension to copy a file into a not existing directory and it will be created automatically

Taifun

PS: for future questions please use the new community here https://community.appinventor.mit.edu/
thank you


Trying to push the limits of App Inventor! SnippetsTutorials and Extensions from Pura Vida Apps by  Taifun.        


PeterO

unread,
Dec 27, 2019, 8:44:14 PM12/27/19
to MIT App Inventor Forum
Thanks Taifun,

Peter
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages