Mass Folder Add script


I had to import a lot of users and assign some default settings to them so I created a query to insert it into the db and it worked fine. Now I have to create default folders for users but going to make a query to add these, it does not work, can someone help me?


P.S.: Not sure if that's the right section here. If not, please move it.

ALWAYS use the tools provided by the platform.
You have the occ command and the provisioning API to create new users.
You also have the skeleton folder (in core/skeleton) where you can place the basic folder structure for new user.

Is there an occ command to create a folder?

If it's for the initial folder structure, use the skeleton folder. Otherwise, use the webdav API. Note that the webdav API requires authentication, so you need the username and password of the account you to to upload files to.