[RESOLVED] Help with selecting directory
Heyy! I have a small question regarding selecting directories... If I have my folder in "...\Desktop\My Folder", and in my folder i have 3 other ones named A, B, C... How can I make the program save a file named "Cheese.txt" in the "C"-named folder? Or if its a file named "123.txt" to save it in a random folder?
Thanks in advanced!:D:D
Re: Help with selecting directory
To get to your desktop folder and other special folders you can use properties of My.Computer.FileSystem.SpecialDirectories object. They will always give you the correct path no matter what system you're on. To save a file to a particular folder you simply specify the full file path including that folder.
When you're talking about anything random you talking about using an instance of the Random class to generate a random number. You can then use that number in whatever way you see fit. In your case you'd put your folder paths into an array or collection and then use the random number as an index to select one of the paths.
Re: Help with selecting directory
That's it! Thanks a lot! :)