How to check if the file already exists?

1,204 views
Skip to first unread message

Team Jaden

unread,
Feb 26, 2017, 8:46:50 PM2/26/17
to MIT App Inventor Forum
Hi, I have a problem. I was creating an app and I put that if you longclick on a button, it will create that file (sound) to your sdcard folder. The problem is : when you longclick on the button, it will always download the file, how to check if that file already exists? 
The program should be like : 
Check sdcard folder, if that file exists, then Notifier says "This file already exists", else, if it doesn't exist in that folder, it will create the file.
Can you help me in doing this please? It would be better if you could post some screens. Have a nice day! :)

Juan Antonio

unread,
Feb 27, 2017, 4:14:13 AM2/27/17
to MIT App Inventor Forum
Hi, try with Screen.ErrorOccurred


Taifun

unread,
Feb 27, 2017, 8:21:55 AM2/27/17
to MIT App Inventor Forum
try the file extension https://puravidaapps.com/file.php and its Exists method



Taifun

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

Abraham Getzler

unread,
Feb 27, 2017, 11:00:27 AM2/27/17
to MIT App Inventor Forum
Reply all
Reply to author
Forward
0 new messages