0

ディレクトリ内でワイルドカードを使用してフォルダを検索しようとすると問題が発生します。

フォルダは次のようになります: [2008][560909][Market Change] or [year][number][name]

これまでのところ、これは私が持っているものです:

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 + "*")

助けてください私はとても混乱しています...

4

1 に答える 1

0

System.IO.Directory.GetDirectories(rootPath, wildcardPattern)返された配列にゼロ以上の要素が含まれているかどうかを使用して確認する必要があります。

于 2012-04-27T20:40:32.733 に答える