Mass Folder Add script

mysql
oc-internals
9.0.x

#1

Hello,

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?

Thanks

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


Mass Folder Add
#2

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.


#3

Is there an occ command to create a folder?


#4

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.