Deleting Files and Erasing the Free Space

Hi there,
I’m looking to make a simplified app with just two buttons that delete the files in specific folders that I have already written their paths in the block code in the app inventor environment and then eras the free space.
One button to delete and one button to erase.
The ideal app is “iShredder 6” but the user should navigate several folders and tabs to delete and eras. But I’m going to create the simplest way to do for as I mentioned before, just specific files and folders. I’d appreciate it if anyone guide me to some useful tutorials.

Hello Maxim

Android 11 restricts App Access to specific Android shared folders plus it's own.

App Inventor does not have the ability to clear memory. That might be deliverable via an extension, but then the extension would also have to perform the file deletion.


Hi Chris,
Thanks for your attention.
Do you have any alternative solution?

Much depends on the use of the App. If it is not going to be distributed, you should be able to get away with using legacy functions in App Inventor. If you want to distribute, you would need to convince Google of the merits of your App. No doubt they would reject your App as they offer a secure one of their own :upside_down_face:

Since deleted files are not actually erased on Android, a good way to destroy the data is to overwrite the file first with nonsense content ( gobbledegook) and then delete it.