TA的每日心情 | 开心 2023-12-2 12:24 |
---|
签到天数: 196 天 [LV.7]常住居民III
|
发表于 2018-12-7 21:57:51
|
显示全部楼层
下面是代码:
'检查蓝光光盘目录结构完整性脚本
Dim SourceFolder, FSO, MSG
SourceFolder = BrowseForFolder("请选择需要检查的蓝光光盘目录", 0, 17)
If SourceFolder <> "" Then
Dim Folder(15)
Folder(0) = SourceFolder
Folder(1) = "\BDMV"
Folder(2) = "\BDMV\AUXDATA"
Folder(3) = "\BDMV\BACKUP"
Folder(4) = "\BDMV\BACKUP\BDJO"
Folder(5) = "\BDMV\BACKUP\CLIPINF"
Folder(6) = "\BDMV\BACKUP\JAR"
Folder(7) = "\BDMV\BACKUP\PLAYLIST"
Folder(8) = "\BDMV\BDJO"
Folder(9) = "\BDMV\CLIPINF"
Folder(10) = "\BDMV\JAR"
Folder(11) = "\BDMV\META"
Folder(12) = "\BDMV\PLAYLIST"
Folder(13) = "\BDMV\STREAM"
Folder(14) = "\CERTIFICATE"
Folder(15) = "\CERTIFICATE\BACKUP"
Set FSO = Wscript.CreateObject("Scripting.FileSystemObject")
For i = 1 To UBound(Folder)
If Not FSO.FolderExists(SourceFolder & Folder(i)) Then
FSO.CreateFolder(SourceFolder & Folder(i))
MSG = MSG & Folder(i) & vbCrLf
End If
Next
If MSG = "" Then
MSG = SourceFolder & "目录下的蓝光光盘目录结构完整"
Else
MSG = "以下目录缺失并已修复" & vbCrLf & vbCrLf & MSG
End If
Else
MSG = "所指定的路径无效"
End If
MsgBox MSG , 64, "完成"
Function BrowseForFolder(ByVal pstrPrompt, ByVal pintBrowseType, ByVal pintLocation)
Dim ShellObject, pstrTempFolder
Set ShellObject = WScript.CreateObject("Shell.Application")
On Error Resume Next
Set pstrTempFolder = ShellObject.BrowseForFolder(0, pstrPrompt, pintBrowseType, pintLocation)
BrowseForFolder = pstrTempFolder.ParentFolder.ParseName(pstrTempFolder.Title).Path
If Err.Number <> 0 Then BrowseForFolder = ""
Set pstrTempFolder = Nothing
Set ShellObject = Nothing
End Function |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|