vba怎样取得vss上文件的时间和大小???
vba怎样取得vss上文件的时间和大小??我自己写了一下没有实现:
# Sub mdlDatapro()
#
# On Error GoTo ErrorHandler
#
# Dim vssDB As New VSSDatabase
# Dim objItem As VSSItem
#
# Set mobjFileSystem = New FileSystemObject
#
# 'VSS
# vssDB.Open SRCSAFE_INI, USER_ID, USER_PASSWORD
#
# Set objItem = vssDB.VSSItem(VSS_ROOT)
# for each vItem in objItem.Items
# vName = vItem ????
# vSize = vItem ????
# vUpDataTime = vItem ????
# next
#
# Set vssDB = Nothing
# Set mobjFileSystem = Nothing
#
# Exit Sub
[解决办法]
Dim vssDB As New VSSDatabaseDim objItem As VSSItemDim vItem As VSSItemDim vVersion As VSSVersionSet mobjFileSystem = New FileSystemObjectvssDB.Open SRCSAFE_INI, USER_ID, USER_PASSWORDSet objItem = vssDB.VSSItem(VSS_ROOT)For Each vItem In objItem.Items For Each vVersion In vItem.Versions If vVersion.VersionNumber = vItem.VersionNumber Then 'vSize = 大小直接取不到,只有将文件下到本地进行判断' vUpDataTime = vVersion.Date Exit For End If NextNextSet vssDB = NothingSet mobjFileSystem = Nothing