2012-04-27 5 views
0

디렉토리 내에 와일드 카드가있는 폴더를 검색하는 데 문제가 있습니다.폴더 와일드 카드 및 열린 폴더를 검색하십시오.

폴더는이 같은 종류의 모양 : [2008] [560909] [시장 변경] 또는 [년] [수] [이름]

는 지금까지이 내가 가진 무엇 :

Function searching() 

Dim choice, input 
Dim strPatheServices 

strPatheServices = "s:\dirr\subdirr\" 
ending = true 

choice = InputBox("Please choose: c for number, y for year created, n for name") 

If choice = "c" Then 
    MsgBox ("You entered: " & choice) 
    input = InputBox("Please input a number:") 
    System.IO.Directory.Exists(strPatheServices\input) 

ElseIf choice = "y" Then 
    MsgBox ("You entered: " & choice) 
    input = InputBox("Please input a year:") 
    System.IO.Directory.Exists(strPatheServices\input) 

ElseIf choice = "n" Then 
    MsgBox ("You entered: " & choice) 
    input = InputBox("Please input a number:") 
    System.IO.Directory.Exists(strPatheServices\input) 
End If 

MsgBox "Done",,"Completed" 

End Function 

나는 곳처럼 때문에 존재하는 와일드 카드를 추가하는 것보다이 서로 갈 불확실입니다 ...

System.IO.Directory.Exists(strPatheServices\input + "*") 

난 너무 혼란 스러워요 도와주세요

+0

Windows에서 터미널 앱을 다시 사용하는 것은 그리 즐거운 짐승이 아닙니다. –

+0

또한, '&'연산자는 VB.Net의 문자열 연결을위한 연산자입니다. '+'연산자는 예기치 않은 결과를 생성 할 수 있습니다. –

답변

0

System.IO.Directory.GetDirectories(rootPath, wildcardPattern)을 사용하고 반환 된 배열에 0보다 많은 요소가 포함되어 있는지 확인해야합니다.