Steps
  1. Open Visual Studio in your system
  2. Select Console Applciation template and give as name "Enablefolder"
  3. Add a Microsoft.Cleint Assembly refrence file in right side refrence tab in visual studio.
  4. Replace Program.cs with the source code below.
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Microsoft.SharePoint.Client;
  7. namespace CSOMCodeSamples
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. // ClientContext - Get the context for the SharePoint Site
  14. ClientContext clientContext = new
  15. ClientContext("http://gauti.sharepoint.com/sites/sp");
  16. // Get the SharePoint web
  17. Web web = clientContext.Web;
  18. // Get the SharePoint list by title
  19. List list = web.Lists.GetByTitle("Newbook");
  20. // Enable folder creation for the custom list
  21. list.EnableFolderCreation = true;
  22. // Update the list
  23. list.Update();
  24. // Execute the query to the server.
  25. clientContext.ExecuteQuery();
  26. }
  27. }
  28. }
Output:

Hit F5 and see the magix happend in SharePoint 2013. Hope you have enjoyed this.!!! :-)

If you want to check the output goto Listsettings-->Select Advanced Settings-->Check the settings has been enbled Successfully.