If I have a string "C:\test\app\data\folder1\file.txt" and I know C:\test exists, what would be the best way to create each subfolder for the purpose of saving the file to the same folder within the same folder structure?
I could get the first position of "\" and check the string between that and the next occurrence, and do this for each subfolder in the string, but I'm just curious if there is a better way.