i want to get a random directory from a specified directory, for example, the desktop.
im not sure how to do this, this and the only thing I’m having trouble with for my application
for example i have 5 different directories on the desktop called
Dir1
Dir2
Dir3, etc…
i would like to get Dir3, then maybe Dir1, after that maybe Dir3 again, and so on. i want to get a random directory from the desktop…dont really know how to explain it any better…
A specified a directory – a directory that i specify maybe in a text box for example. or a folder browser dialog
also i just want to get the path of the directory, i dont want to do anything to it.
If anyone could provide some information I would be greatly appreciative 😀
thanks everyone!
This kind of smells like homework to me. But I’ve got some time to kill. The function below takes a path as a string and returns a random subfolder as a string.