ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Dir ¨ç¼Æ¨Ï¥Î²¾°Ê¦h­Ó¸ê®Æ°ÝÃD

¥»©«³Ì«á¥Ñ luhpro ©ó 2016-3-13 01:49 ½s¿è

¦^´_ 1# Jason80Lo
©Î³\§A¥i¥H¸Õ¸Õ¬ÝFileSearch ª«¥ó.
(¥H¤Uµ{¦¡¬O¨Ì Excel VBA ©Òªþ½d¨Ò­×§ï)
  1. Sub nn()
  2.   Dim iI%

  3.   With Application.FileSearch
  4.     .NewSearch
  5.     .LookIn = "D:\20160309"
  6.     .SearchSubFolders = True
  7.     .Filename = "·s¤å¦r¤å¥ó*.txt"
  8.     .MatchTextExactly = True
  9.     .FileType = msoFileTypeAllFiles

  10.     If .Execute() > 0 Then
  11.       MsgBox "§ä¨ì " & .FoundFiles.Count & " ­ÓÀÉ®×."
  12.       For iI = 1 To .FoundFiles.Count
  13.         MsgBox "²Ä " & iI &."­ÓÀɮ׬° : " & FoundFiles(iI)
  14.       Next iI
  15.     Else
  16.       MsgBox "§ä¤£¨ì¥ô¦óÀÉ®×."
  17.     End If
  18.   End With
  19. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD