PostCreating a Random Directory

Posts 1–5 of 5 · Page 1 of 1
Creating a Random Directory
hello
i know that on a .bat file u can type
md %random%
and a folder with a random name will apear, if tried to do it in VB but the code doesnt work...is their any code for VB that makes a random directory?
Code:
Dim x as string = "D:\" & rnd()*100000
My.Computer.FileSystem.CreateDirectory(x)

OR


Code:
Dim rand as new Random
'Creates a random directory from 1 to 10000
My.Computer.FileSystem.CreateDirectory("D:\" & rand.next(1,10000))
Wow you're good MJ =D
Quote Originally Posted by Invidus View Post
Wow you're good MJ =D
Haha thnx, that was easy
easy as hell...
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?