We've recently had an application which installs using an INNO script undergo a significant restructuring.
Unfortunately the application requires certain files to persist from version to version.
Even more unfortunately, the location of these files has changed during this restructuring.
Most unfortunately, it now falls to me to craft an INNO script fragment which will look to see if those files exist, and to move them from their former location to their new location.
Is it possible to have an INNO script check to see if files (which have nothing to do with the INNO script itself in any capacity) exist, and if they do, to move them to a new location before/after the install is completed?
EDIT 1 : For Clarity
I say that these files have nothing to do with the INNO script because they are user-generated content.
Yes, it is possible. The code below is a copy and delete (instead of a raw move or rename).
Use the
[code]
section to implement this logic.The documentation about supported functions and the events you can handle is pretty good.
How to react on a beginning installation:
How to know whether a file exists or not
Copy a file (overwrite exisiting file)
Delete a file