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

[µo°Ý] ¸ê®Æ§¨°ÝÃD½Ð¯q

  1. Public r As Integer

  2. Sub À°§Ú°µ()
  3.    
  4.     Dim r As Integer
  5.     Dim fs As New FileSystemObject
  6.     Dim myfolder As Folder
  7.     Set myfolder = fs.GetFolder("D:\TEST")
  8.    
  9.     r = 0

  10.     ¦C¥X¸ê®Æ§¨ myfolder

  11. End Sub


  12. Sub ¦C¥X¸ê®Æ§¨(fd As Folder)

  13.     Dim f As File
  14.     Dim sfd As Folder
  15.    
  16.     For Each sfd In fd.SubFolders
  17.         For Each f In sfd.Files
  18.             r = r + 1
  19.             Cells(r, "A") = Split(fd, "\")(2)
  20.             Cells(r, "B") = Split(sfd, "\")(3)
  21.             Cells(r, "C") = f.Name
  22.             Cells(r, "D") = f.DateLastModified
  23.         Next
  24.         ¦C¥X¸ê®Æ§¨ sfd
  25.     Next

  26. End Sub
½Æ»s¥N½X
diabo

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD