Some web platforms, like Apache Tomcat and Voxeo Prophecy, require their configuration files to be kept in specific locations under the platform’s installation folderpath. This creates a minor annoyance when developing for these platforms, because your IDE may not be able to add such a folderpath to its workspace. But even if the IDE can access such a folderpath, or even if you can create a symbolic link to it, the IDE might add project-related files that would confuse the web platform.
As a workaround, I’m using FreeFileSync to define rules about which items from the two folders should be overwritten by newer files from the other folder. However, FreeFileSync only syncs when prompted to via its GUI. To automatically detect new files and trigger sync, you can use the companion app RealtimeSync (which is included in the FreeFileSync installer). Yet, RealtimeSync is an app rather than a service, so you need to configure Windows to launch it whenever you start Windows or resume from sleep.
- This app’s sourceforge page has a download button, but it will lead you through several hops before you get to a mirror at “FossHub”.
- The download links can be hard to find. Look in the light blue box near the top for a set of links such as “Download FreeFileSync for Windows”.
- During the installation, avoid Express install because it will install bloatware; use Custom Install instead.
These steps are adapted from another guide.
- If there are any files already in the web platform folder(s) that you want under the IDE’s control, import them to the corresponding project folder(s) in the IDE now
- In FreeFileSync, click the small green ‘+’ button above the left file listing pane to add as many pairs of folders to sync as you need.
- Set the left folder listing to the project folder, and the right folder listing to the web platform’s configuration folder
- Customize the default syncing across all folder pairs by clicking the green gear button in the upper-right
- Cause new items in the left folder to be copied to the right folder. Cause edited items in the left folder to overwrite the corresponding file in the right folder. Note that only files introduced after RealtimeSync is first started will count as “new”, which is a good thing if you don’t want all the files in the left folder copied over.
- If you need to override the default sync behavior for any pair, use the small gear button that’s between the folderpaths
- Click OK to close, then go to Program | Save As Batch Job
- I recommend creating a top-level Dropbox folder called Settings where this batch-settings file can be kept.
- Launch RealtimeSync
- Go to Program | Open and select the batch-settings file you just created.
- Click Start.
Configuring ScheduleTasks (Windows) to launch RealtimeSync
- Use Windows+Q to open the start menu search box, enter “schedule”. Either “Schedule tasks” (in Windows 8) or “Task scheduler” (Windows 7 and before) should be offered. Select it.
- In the app that appears, select Create Basic Task.
- Under General | Name, enter something like “RealtimeSync after login”
- Set the trigger to be “On local connection to any user session”
- Set the action to be “Start a program” and browse to RealtimeSync’s executable (probably at
C:\Program Files\FreeFileSync\RealtimeSync.exe). Under “Add arguments”, paste a complete path to the batch-settings file. (I recommend the Copy Path feature of FileMenuTools, a separate app, for this frequently-needed ability.)
- Under Conditions, make sure there are no dependencies on idleness, AC power, etc.
Verifying that it works
- Logout of your Windows session, then log back in.
- Edit one of the project files and save it. The FreeFileSync dialog should appear within a second or two, and disappear within a second.
- Verify that the corresponding file in the web platform folder has the edited content.