vbs- On Error Resume Next
- Dim n, fso, i, s, strFolder, objFile
-
- n = WSH.Arguments.Length
- if n = 0 Then MsgBox "请拖拽文件夹" : WSH.Quit()
- Set fso = CreateObject("Scripting.FileSystemObject")
-
- For i = 0 To n - 1
- strFolder = WSH.Arguments(i)
- If fso.FolderExists(strFolder) Then
- s = ""
- For Each objFile In fso.GetFolder(strFolder).Files
- If LCase(Right(objFile.Name, 4)) = ".jpg" Then
- s = s & objFile.Name & vbCrLf
- End If
- Next
- fso.CreateTextFile(strFolder & "\当前JPG文件清单.txt", True, -1).Write(s)
- End If
- Next
复制代码
- On Error Resume Next
- Dim n, fso, i, s, strFolder, objFolder
-
- n = WSH.Arguments.Length
- if n = 0 Then MsgBox "请拖拽文件夹" : WSH.Quit()
- Set fso = CreateObject("Scripting.FileSystemObject")
-
- For i = 0 To n - 1
- strFolder = WSH.Arguments(i)
- If fso.FolderExists(strFolder) Then
- s = ""
- For Each objFolder In fso.GetFolder(strFolder).SubFolders
- s = s & objFolder.Name & vbCrLf
- Next
- fso.CreateTextFile(strFolder & "\当前文件夹清单.txt", True, -1).Write(s)
- End If
- Next
复制代码
|