While not a case that many of you may have run into, syncing and sharing empty folders does come in handy from time to time. Why would you want to share empty folders? One example is when you want to create a template of folders for others to use to organize their information. For example, if you are sharing with multiple clients, you may want to create the same directory structure for each to guide them in where to put their stuff as they collaborate with you.
If you do find the need to synchronize empty folders, there are a few things to be aware of. Today, Syncplicity follows the same conventions as many source code repository systems so it doesn't synchronize folders that don't have a file or folder within it. What this means is if you have a set of directories like the following but no files within them, some of the folders will not automatically synchronize as they are empty.
- Client A Folder
- Draft Designs
- Approved Designs
In the example above, the folders
Reviewed and
Approved Designs would not appear on clients' computers automatically until they have files within them. However,
Draft Designs would synchronize and appear as it is non-empty since it has the
Reviewed folder within it. For the techies out there, this means leaf folders in a tree do not synchronize unless there is a file within them.
So how do we work around this issue if you need to synchronize folder templates? The same was as a you would with a source-code repository - by creating zero byte files within the empty leaf folders. To help make this easier, the Syncplicity team has created a simple Windows PowerShell script that automates this for you with just three easy steps.
To use it, you will need to have Windows PowerShell installed. The easiest way is have Windows 7 or Windows Server 2008 where it is installed by default. If you are using an earlier version of Windows, you will need to
download and install it from here. Make sure it is set up to allow you to run PowerShell scripts with a Unsigned execution policy. If you don't know what that is, no problem --
here's a step-by-step guide to get you set up.
Now that you've got PowerShell, you will need to
download the script.
In this example, I will assume your template folder is in C:\template and you've downloaded the script to C:\CreateEmptyFolderLeafFiles.ps1. You will need to change the examples below to match your directories.
- To run the script, first start PowerShell and change the directory to your folder template by typing: cd C:\template. Press enter.
- Then, type: & "C:\CreateEmptyFolderLeafFiles.ps1" and press enter.
- You will be prompted to confirm the creation of empty files. Enter Y and press enter.
That's it -- your folders will now all synchronize to other computers. In the empty folders, a zero-byte file called
_empty will have been created in each one. If you're more adventurous, you can open the script within a text editor and change the file name to whatever you'd like.
Moving forward, synchronizing empty folders is something on our roadmap to change but in the meantime this is a fast and easy workaround.
It is installed by default on
Comments