ilektronik
Programmer
Alright this is confusing to explain without drawing it out, but here we go. I am working on a team writing a web application using VB.NET. The application takes a file from one directory, and saves it into a new directory based on a directory structure logic. The piece I am working on is to create a function that figures out what the "next" directory to create is. Here is how the directory structure works: You start off with directory "00" , dump the files in that directory and the user logs off. The next user logs on, and the program should dump the files in "01" then the user logs off. This continues until we reach the directory "99". After that, the next user to log on, the program should dump the files in "01/00" . Then the next time, the program should dump the files into "01/01" , then "01/02", and so on until we reach "01/99" , and which point we move on to "02/00", then "02/01", until we reach "99/99", then the next directory to create is "01/00/00" , then "01/00/01", all the way until we reach "01/00/99", and we move on to "01/01/00". We continue this to "01/99/99", then we move on to "02/00/00", then "02/00/01", all the way to "02/99/99", and we continue this logic until we reach "99/99/99", and we move on to create "01/00/00/00", and the insanity continues.. Now if you noticed, there is no "00/01", but there is a "01/00/01", that is the only exception to the rule, the first "00" directory has no subdirectories. Ok now that I have completely confused myself in explaining this, hopefully someone can help me figure this out. Thanks!! (PS, code examples would help me since I am an ex-Java guy new to VB.NET, or VB anything for that matter)