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

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

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

¦U¦ì¤j¤j¡A¤p§Ì¨Ï¥ÎDir¨ì«ü©wªº¸ê®Æ§¨ªº¤l¸ê®Æ§¨¤¤±N¸Ì­±ªº2­Ó .TXTÀÉ¡ACopyFile¦Ü§Ú¥t¤@­Ó«ü©wªº¸ê®Æ§¨¤¤±Æ§Ç
¦ý¬O¥u¯à°÷·j´MCopy¨ì²Ä¤@­Ó.txt¡A´NµLªk·j´MCopy¨ì²Ä¤G­Ó.txt, ¨Ï¥Î Do While xFile <> "" °j°é·Q­n¨Ó§ì¨ú·j´M¨ì²Ä¤G­Ó.txt  
¦ý¥Ø«eÁÙ¬O¨S¦³¦¨¥\¡A½Ð°ª¤â¨ó§U¡A·PÁÂ

20160309.rar (61.58 KB)

¥»©«³Ì«á¥Ñ 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 : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD