R Ricardo Bunschoten Active Member Licensed User Longtime User Aug 17, 2015 #1 I have a question I want to remove a folder and i want this under a button. I only find file.delete option but that is for files and not for folders ? The folder is located in Android/data/xbmc.org.kodi/files/.kodi/ And i want to remove the folder .kodi which is not empy and has also subfolders with files.
I have a question I want to remove a folder and i want this under a button. I only find file.delete option but that is for files and not for folders ? The folder is located in Android/data/xbmc.org.kodi/files/.kodi/ And i want to remove the folder .kodi which is not empy and has also subfolders with files.
Erel B4X founder Staff member Licensed User Longtime User Aug 17, 2015 #2 Based on this folder path you will not be able to access it. It is restricted to a different app with this package name. Upvote 0
Based on this folder path you will not be able to access it. It is restricted to a different app with this package name.
R Ricardo Bunschoten Active Member Licensed User Longtime User Aug 17, 2015 #3 OK but i am able to unpack to this folder so i can read/write Or is this simply the way Android works. Upvote 0
OK but i am able to unpack to this folder so i can read/write Or is this simply the way Android works.
Erel B4X founder Staff member Licensed User Longtime User Aug 17, 2015 #4 Is this the exact path? Doesn't it start with /sdcard? Upvote 0
R Ricardo Bunschoten Active Member Licensed User Longtime User Aug 17, 2015 #5 This is the exact path i use in my code dirrootexternal to acces it It's assigned as sd card memory but since it's a androidbox i am testing code on ít's solderd on the board Upvote 0
This is the exact path i use in my code dirrootexternal to acces it It's assigned as sd card memory but since it's a androidbox i am testing code on ít's solderd on the board
Erel B4X founder Staff member Licensed User Longtime User Aug 17, 2015 #6 You can use this code to delete a folder recursively (be careful...): Code: Copy Sub DeleteFolderRecursive(Folder As String) For Each f As String In File.ListFiles(Folder) If File.IsDirectory(Folder, f) Then DeleteFolderRecursive (File.Combine(Folder, f)) End If File.Delete(Folder, f) Next End Sub Upvote 0
You can use this code to delete a folder recursively (be careful...): Code: Copy Sub DeleteFolderRecursive(Folder As String) For Each f As String In File.ListFiles(Folder) If File.IsDirectory(Folder, f) Then DeleteFolderRecursive (File.Combine(Folder, f)) End If File.Delete(Folder, f) Next End Sub
R Ricardo Bunschoten Active Member Licensed User Longtime User Aug 17, 2015 #7 Thnx Erel Will try tonight and it's on my android box which has a factory reset option Upvote 0
LucaMs Expert Licensed User Longtime User Aug 17, 2015 #8 I particularly like this phrase: Erel said: (be careful...) Click to expand... Upvote 0