andre.vieira
Posts: 5
Joined: Fri Oct 28, 2022 4:17 pm

Automatically move newly added files to its folder's feature

Fri Oct 28, 2022 4:50 pm

Hi,

I have a project with multiple features and with APPDIR folders associated to those features. I also have an automated script, that runs frequently and that downloads the most recent version of my code from a CI platform. But everytime there is a new file or a name change, these files get associated with the main feature instead of the feature associated with the folder it belongs to.

For example: I have directory dir1 which I moved to feature1, and if I add a new file to dir1 it gets associated with the main feature and not feature1.

This becomes problematic as we have multiple features and have to open AI everytime we run the update script to ensure that all files are associated with the right features.

Is there any way to ensure that if a file is added to a folder associated to a feature, then that file should also get associated to that folders' feature and NOT the main feature.?

Regards,
André Vieira

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: Automatically move newly added files to its folder's feature

Mon Oct 31, 2022 1:48 pm

Hello André and welcome to our forums,

There isn't quite a predefined support that achieves exactly what you need, but we can get close to that.

First of all, your folder is just a component that you have moved under a feature you created, but that does not mean they are somewhat linked.

In Advanced Installer, there is a "current feature" that all the files are added under. You can see this by going to the "Organization" page (it is the bolded feature). you can click on another feature and press the "Set as Current" button from the toolbar.

Beside manually moving the files to the expected feature, we can craete some sort of a link if we use Synchronized Folder support:
Screenshot_5.png
Screenshot_5.png (41.58KiB)Viewed 4525 times

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

andre.vieira
Posts: 5
Joined: Fri Oct 28, 2022 4:17 pm

Re: Automatically move newly added files to its folder's feature

Mon Oct 31, 2022 6:20 pm

Hi,

First of all, thank you very much for your response. I think I may have found the problem why files don't go in the corresponding Feature.
I also forgot to mention but I was already using the Synchronized folder option and I think this was part of the issue.

In my APPDIR folder structure I have some folders that hold multiple child folders inside and each child is linked to a feature. I noticed that I had the Synchronized Folder option turned on for both the parent and child folders and so I thought that this could probably be resulting in a conflict for the destination feature.
I have now removed the synchronization option from the parent folders and tried to add some new files to the child folders and now it seems all files are going in the intended features.

I will probably have to change my APPDIR folder structure to avoid these conflicts and keeps all folders synced but atleast I think I found the problem.

Thank you for your time,
Best regards

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: Automatically move newly added files to its folder's feature

Tue Nov 01, 2022 1:33 pm

You are always welcome, André!

Glad to hear you managed to find the culprit.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”