Dim DirName_M As String = Now.Month
Dim DirName_Y As String = Now.Year
Dim Str_path As String = "D:\test\"
If Directory.Exists(Str_path & DirName_Y) = False Then
Directory.CreateDirectory(Str_path & DirName_Y)
End If
Str_path &= DirName_Y & "\"
If Directory.Exists(Str_path & DirName_M) = False Then
Directory.CreateDirectory(Str_path & DirName_M)
End If