vbs文件夹属性
发布时间: 2024-09-27 13:30:30
A. VBS读文件夹问题
''保存为vbs放在(网络游戏)文件夹里
Dim aFiles,aFolders.Fso
On Error Resume Next
Set Fso = CreateObject("Scripting.FileSystemObject")
objFolder = CreateObject("WScript.Shell").CurrentDirectory
ShowFolders Fso.GetFolder(objFolder)
MsgBox "检查完毕"
Function ShowFolders(Folder)
For Each Subfolder in Folder.SubFolders
'WScript.Echo Subfolder.Path
If Not (Fso.FileExists(Subfolder.Path & "1.txt")) Then
MsgBox Subfolder.Path & " 文件夹里无1.txt"
End If
ShowFolders Subfolder
Next
End Function
补充回答:代码里Subfolder.Path就是文件夹名
MsgBox Subfolder.Path & " 文件夹里无1.txt"
改成
MsgBox Subfolder.Path
热点内容