Sorry for the stupid question but i'm developing my first portableapps.
My app need to move a dir and a file:
[Environment]
FullAppDir=%PAL:AppDir%\TeraCopy
[FilesMove]
Settings\Options.ini= %FullAppDir%
[DirectoriesMove]
Settings\Teracopy=%APPDATA%\Teracopy
All is OK.
At the start of program file and dir are moved as expected.
At the end of program file and dir return to their place.
When the application start the file and the folder are REMOVED from %PAL:AppDir%\Setting.
If during application works PC crash, USB problem, blackout etc i lose the data and the application would stop functioning without manually work of data recovering.
How can I avoid losing data?
Thanks for your attention.
The PAL has already consider the abnormal exit problem.
I think your code have some error.
As far as I know, the environment path variable "FullAppDir" should be set in custom code not in Environment section. And also needed only if you are making a 32+64 bit application, otherwise this variable is not needed.
I suggest you to change the code as follow:
[FilesMove]
Settings\Options.ini=%PAL:AppDir%\TeraCopy
[DirectoriesMove]
Settings\Teracopy=%APPDATA%\Teracopy
Thanks for your answer!
I would not want to appear presumptuous after I said a novice.
Here https://portableapps.com/manuals/PortableApps.comLauncher/ref/launcher.i... there is the example
APPNAME_HOME=%PAL:DataDir%\settings
The variable was created for ease of development or, if you prefer, for simplicity.
Maybe in this application it may seem excessive but other more complex can be useful.
Today is a holiday in Italy (called ferragosto).
Good day for all