Skip to main content
Question

Creating the folder and sub folders programmatically

  • May 22, 2025
  • 2 replies
  • 44 views

Forum|alt.badge.img

Hi,

I Have a parent folder inside that there 3 sub folders and in each sub folder we have sub sub folders.

 

Could you please help me how to create the above usecase in Box Java Sdk with the code snippet.

 

Thanks & Regards,

C.Kalyan

2 replies

Forum|alt.badge.img

 Please see the Box Java SDK documentation — this has information on how to work with folders, including how to create new folders.


Forum|alt.badge.img

I tried that way by creating statically and hard coded the folder name  it worked but if we get the parent folder name and its child folder names dynamically it is giving null pointer exception. But if debug we are getting all values but while creating the folder we are getting exception.If you sample code snippet for 1 level and in recursive way can u share it