I have a silly little project on the go to try and teach myself about folders.
Using the examples that came with xojo i have an application that gets the contents of a folder and populates the listbox with the name of the contents.
But what I am currently stuck on is if I delete the folder from my computer. It is crashing the app.
I’ve tried the following code.
Var dlg As FolderItem = SpecialFolder.UserHome Var c As FolderItem c = dlg.Child("appdata\Roaming\Vortex\downloads\") arrayList.RemoveAllRows For Each file As FolderItem In c.Children if dlg.Exists then arrayList.AddRow(file.Name) end if next else msgbox("This folder does not exist!") end if
If anyone could offer any guidance it would be greatly appreciated!