Is there a limit for the number of folders a library can have? If so, what is the limit?
Salesforce documentation has not mentioned this limit. There is a limit for the number of folders in a library, Maximum 500 folders could go in a library.
Attached the images showing error messages while trying to create a folder in a library that has 500 folders, Dev log while trying to add a folder from a VF page.
As far as documentation is concerned, there isn't. However, there are limitations to the number of libraries as well as the number of files:
- Content: maximum number of libraries - 2,000
- Content: maximum number of content documents - 30,000,000
Further information on limits can be found in the help article about Salesforce Files and Salesforce CRM Content Limits.