我想創建5000個目錄,其目錄的名稱是計數器。用VB.NET創建5000個目錄
下面是我想要使用的代碼,但是這隻爲我創建1個目錄,爲什麼?
Dim Counter As Integer
Counter = 1
Do Until Counter = 5000
FolderPath = "C:/pics/" + Counter.ToString() + "/"
Directory.CreateDirectory(FolderPath)
Loop
Counter += 1
VB.NET或C#會這樣做,我只想運行一次。
你可能想向上移動計數器邏輯進入循環。 – JonH