Can end users be prevented from creating folders in document libraries (in specific site collections) without preventing them from adding files to existing folders?
Through permissions there is no way to differentiate between being able to add files and add folders.
But you still have two options:
If your document libraries are set up with the right folders and nobody should add new folders then you can just go into
Library Settings|Advanced Settingsand set
Make "New Folder" command available?to No. If you then later need to add new folders, then someone with
Manage Listspermissions can open a window by setting it to Yes, Create the folder and resetting it to No.
You can write an Event Receiver which denies any attempt to add a new folder based on your own logic.
To enable or disable folders in lists and libraries, you go to the list or library settings page by switching to the List ribbon or Library ribbon and clicking the List Settings or Library Settings button. On the settings page, you click the Advanced Settings link to get to the Advanced Settings page of the list or library . On that page, you choose Yes or No for the Make New Folder Command Available option, which is located in the Folders section of the page
Disabling new folder option in Advanced Settings is not enough. If users have permissions to open the library in File explorer via "Open with Explorer" option in the ribbon (Classic view), they can use standard windows option to add new folders. This menu option can be restrained by altering permission levels / creating a new permission level at the site collection level. Also the page view must be restricted to classic experience only. Until Microsoft comes with an elegant option to prevent folder creation, only workarounds are the solutions!