IDE Build Steps/Scripts

Hello developers,

I added a Build Step which copies a file, a SQLIte database in Resources Folder This is the base database file. That works fine. But since this directory can be carried away if the application is deleted before it is reinstalled, I am loosing that file. Also, I would like to find a directory that is not the application tree. SpecialFolder.ApplicationData seems good but the Copy command does not seem to offer that destination.

My question is two-fold:

  1. How can I during Build copy the db file to SpecialFolder.ApplicationData ?

  2. How can I check if the file is already in SpecialFolder.ApplicationData and then not Copy it there ?

This is a Desktop Application that targets bot Windows and MacOS, developed using 2021r3.

Thanks to all

Your app should do the copying to ApplicationData. Build steps are for copying files into your build because they run at build time, not when the app launches.

Since there does not seem one can a add a file into project, well I haven’t found some, I will use a Copy command at build time to copy the base database to Resources Folder, and when the app starts, if the file is not in SpecialFolder.ApplicationData I will copy from Resources Folder to SpecialFolder.ApplicationData.

Thanks Greg

@Greg_O_Lone Confirmed, your solutions works fine.