Hi,
I am copying a file from the DefaultExternal directory to the DirInternal directory.
I am checking and copying the file like:
I am running the above code when the app first opens. (from the Starter Service - Service_Create)
At a later time, I am deleting the file in DefaultExternal directory, so the above code won't run next time the app runs.
If the code at a later time doesn't run to delete the file then next time the user opens the app, the file will still exist and it will run the above code again.
The question I have is, if the file still exists in the defaultExternal and I was to copy the file again (as the code above) would it detect that the file already exists in the new location and not copy or would it still copy the file and replace it ?
I am copying a file from the DefaultExternal directory to the DirInternal directory.
I am checking and copying the file like:
B4X:
If File.Exists(rp.GetSafeDirDefaultExternal(""), "myFile.db") = True Then
File.Copy(rp.GetSafeDirDefaultExternal(""),"MyFile.db",File.DirInternal,"myFile.db")
End If
I am running the above code when the app first opens. (from the Starter Service - Service_Create)
At a later time, I am deleting the file in DefaultExternal directory, so the above code won't run next time the app runs.
If the code at a later time doesn't run to delete the file then next time the user opens the app, the file will still exist and it will run the above code again.
The question I have is, if the file still exists in the defaultExternal and I was to copy the file again (as the code above) would it detect that the file already exists in the new location and not copy or would it still copy the file and replace it ?