Synchronize folder with project folder - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

splay
Posts: 58
Joined: Tue May 15, 2007 6:09 pm

Synchronize folder with project folder

Hi Guys,

I would like to Synchronize folders but not with a local folder on my harddrive.

Instead, I would like to synchronize with a folder in the application so if I have files in folder1 I also want those files in folder2.

Can this be done?

Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Synchronize folder with project folder

Hi,

I'm afraid that this is not supported by Advanced Installer. A folder in the "Files and Folders" page can be synchronized only with a directory on the disk.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
splay
Posts: 58
Joined: Tue May 15, 2007 6:09 pm

Re: Synchronize folder with project folder

Thanks Cosmin,

Is it possible then to copy one of the application folders using vbscript.

For example I have the folder [Application Folder] - [images] and I want to copy that to [Application Folder] - [theme] - [images]

In the vb script I only want to copy the files from first folder into the second.
There will be other files already in the second folder on the machine so I dont want to affect them.

During the install, I need the vb script to list all the files in the images folder (that the installer is adding) and when the install finalizes, I want then to copy those files from the actual folder on the machine, into the second one.

is it possible?

Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Synchronize folder with project folder

Hi,

What you need could be done through a custom action, but I'm not sure how that custom action would look like. For simply copying files from one folder to another you can try using the XCOPY command. For example, the command line of an "Exe with working Dir" custom action can look like this:

Code: Select all

"[%ComSpec]" /C XCOPY "[APPDIR]images" "[APPDIR]theme\images"
This custom action can be scheduled under "InstallExecuteSequence" -> "InstallFinalize" so it runs after the files are installed.

However, if you also want to list the files you want to copy, you can try using a custom action. Perhaps you will find this sample code usefull.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
splay
Posts: 58
Joined: Tue May 15, 2007 6:09 pm

Re: Synchronize folder with project folder

Thanks Cosmin,

From looking at the command it would copy everything in the folder into the new one, this would actually be a big process as there are a lot of images already in the folder before I add to them.

I have created the folder in the Files & Folders screen and then added each file by using the "File Operation" > "Duplicate File", its a bit labourious but I think it will do the job.

Thanks for your help as always.

Splay

Return to “Common Problems”