Database Restoration Issue Msg 3156, Level 16, State 6
I found the solution of my problem which was folder location. The folder gets created itself. So once I removed the last folder name which was in some format 


  "TableName_Memory_Optimized"


And using only below path in my restoration script it starts working fine.


  'D:\FolderPath'