I want to be able to replicate only the folder structure (not the contents) from one location to another in c# 3.5
for example
C:\Some Folder
+ Folder A
+ Sub Folder A
+ Sub Folder B
+ Sub Folder B1
+ Sub Folder B2
+ Sub Folder C
To New Location
C:\Some New folder
+ Folder A
+ Sub Folder A
etc… etc..
Do you mean you want to create the same files, but not the contents within the same structure.
Something like this might work:
You might also want to do some exception checking to ensure that the root and the newRoot parameters are valid (ie: rooted, etc…)
If you don’t want the files and just the directories, then just remove the second loop.