Might be because it is late, but I can’t seem to find why this is not working:
Dim f As FolderItem
f = SpecialFolder.Desktop.Child(ResourcesFolderName).Child(PreferencesFolderName).Child(PreferencesFileName)
When I run this, I get a NilObjectException. I tried replacing the constants with strings and got the same result. If I delete one of the Child folder, it works… I guess I am missing something simple, but I can’t figure out what.
f = SpecialFolder.Desktop.Child(ResourcesFolderName)
does not exist then
f = SpecialFolder.Desktop.Child(ResourcesFolderName).Child(PreferencesFolderName)
will be nil and
f = SpecialFolder.Desktop.Child(ResourcesFolderName).Child(PreferencesFolderName).Child(PreferencesFileName)
will raise an exception
step through this version of your code and you’ll see
Dim f As folderitem
break
f = SpecialFolder.Desktop.Child("ResourcesFolderName") // doesn't exist
f = SpecialFolder.Desktop.Child("ResourcesFolderName").Child("PreferencesFolderName") // f is now NIL
f = SpecialFolder.Desktop.Child("ResourcesFolderName").Child("PreferencesFolderName").Child("PreferencesFileName") //boom !
I’d go through each one
That way if you find that one doesn’t exist but SHOULD you have the chance to create it
If you dont you have a harder time knowing WHAT is wrong - like your initial post