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

[µo°Ý] Â^¨úJPGªº©çÄá®É¶¡

[µo°Ý] Â^¨úJPGªº©çÄá®É¶¡

½Ð°Ý¦U¦ì¤j¤j:
§Ú·Q¥ÎExcelÂ^¨ú¥X"C:\temp"¤¤©Ò¦³JPGÀÉ©çÄ᪺®É¶¡¡A½Ð°Ý¸Ó±q­þ¸Ì¤U¤â
ÁÂÁÂ!

¦^´_ 1# modelcrazyer
ºô¸ô¤Wªº½d¨Ò§ïªº¡A°Ñ¦Ò¬Ý¬Ý¡C
  1. Sub getDetailsOfFile()
  2. Dim objFSO As Object
  3. Dim objFolder As Object
  4. Dim objFile As Object
  5. Dim myShl As New Shell
  6. Dim curFolder As Folder
  7. Dim theItm As FolderItem
  8. Dim Fn As Variant
  9. Dim theTitle As String
  10. Dim outStr As String

  11.     tarPath = "C:\Temp"
  12.     Set objFSO = CreateObject("Scripting.FileSystemObject")
  13.     Set objFolder = objFSO.GetFolder(tarPath)
  14.     Set curFolder = myShl.Namespace(tarPath)
  15.     For Each objFile In objFolder.Files
  16.         If Right(objFile.Name, 3) = "JPG" Or Right(objFile.Name, 3) = "jpg" Then
  17.             With curFolder
  18.                 fName = objFile.Name
  19.                 theTitle = .GetDetailsOf(fName, 12)
  20.                 If .GetDetailsOf(.Items.Item(fName), 12) <> "" Then
  21.                     outStr = fName & vbTab & theTitle & ": " & vbTab & .GetDetailsOf(.Items.Item(fName), 12)
  22.                     Debug.Print outStr
  23.                 End If
  24.             End With
  25.         End If
  26.     Next objFile

  27.     Set myShl = Nothing

  28. End Sub
½Æ»s¥N½X

TOP

«D±`ÁÂÁÂ!!²×©ó¦³­Ó¤è¦V¤F!!
¥i±¤¿é¥Xªºµ²ªG¬O©çÄá¤é´Á:?2016/?3/?26
¦A½Ð°Ý«ç»ò§â°Ý¸¹¥h°£

TOP

¦^´_ 3# modelcrazyer
¦pªG¥u¬O­n¨ú±o¸ê°T¡A±Nprint¥X¨Óªº¸ê®Æ½Æ»s¨ìµ§°O¥»¸Ì¡A§â?¨ú¥N±¼À³¸Ó´N¥i¥H¤F¡C

TOP

        ÀR«ä¦Û¦b : ÀR§¤±`®¦¤v¹L¡B¶¢½Í²ö½×¤H«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD