|
再一次学习Shell
- Private Sub deldel()
- Dim Fso As FileSystemObject
- Set Fso = New FileSystemObject
- Dim oFile As File
- Dim Rng As Range
- Dim oSh As Shell32.Shell
- Set oSh = New Shell32.Shell
- Dim FolderIt As FolderItem
- Set Rng = Selection
- Set oFile = Fso.GetFile(Rng)
- Debug.Print oFile.Path
- oDir = Replace(oFile, oFile.Name, "")
-
- Set FolderIt = oSh.Namespace(oDir).ParseName(oFile.Name)
-
- Ss = FolderIt.ExtendedProperty("System.Photo.DateTaken")
-
- Debug.Print FolderIt.ExtendedProperty("System.Photo.DateTaken") = ""
- Debug.Print oFile.DateLastModified, oFile.Name
- Debug.Print oFile.DateCreated, oFile.DateLastAccessed
- Stop
- Stop
- oDate = CDate(FolderIt.ExtendedProperty("System.Photo.DateTaken")) + #8:00:00 AM#
- Debug.Print oDate
- Stop
- Stop
-
- End Sub
复制代码 |
|