the folder mappings are also stored in the owncloud.cfg file; just create some with the GUI to see how it works. Once you have logged an account and created a few, some new lines appear under the [Accounts] section of the config file. Take a look at this example:
represents a different folder mapping (the one with sequence number N; unique for the system, assigned from 1 onwards) for the user U (unique system id for the user too, assigned from 0 onwards) the parameters, as you can guess, mean:
ignoreHiddenFiles wheter the hidden files under this folder are synced or not
localPath the local-side of the mapping (a folder on your system)
paused if the sync is paused / not
targetPath the remote path on the server
So, knowing this, It shouldn't be hard to create a script to manage easily these mappings. However, it's really easy to mess up, so be careful!
For a big project (about 2000+ users i think) we prepare a csv-file which basically is a matrix of username versus 'group'-folders.
I cooked up a script that reads out the csv, determines the folders it should have setup, puts all the relevant information in the config file. Testing it in the real world tommorow!