Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write error
at com.microsoft.jdbc.base.BaseExceptio ns.createE xception(U nknown Source)
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set fileOutput = oFSO.CreateTextFile(Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Jar_Files_Log.csv", True)
Folders "C:\Tomcat 5.0"
fileOutput.Close
Function Folders(strFolder)
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = oFSO.GetFolder(strFolder)
For Each Folder In Split(strFolder, ",")
'WScript.Echo Folder
Set objFolder = oFSO.GetFolder(Folder)
''WScript.Echo objFolder.Path
Set colFiles = objFolder.Files
' -- Please note: This is necessary to show files
' -- In a base folder (no subfolders)
For Each objFile In colFiles
If Right(objFile, 4) = ".jar" Then
'WScript.Echo objFile.Name
'WScript.Echo objFile.Path
ZipContents objFile.Path
End If
Next
' -- Recurse Subfolders
ShowSubFolders(objFolder)
Next
End Function
Function ZipContents(ZipFile)
' This function uses X-standards.com's X-zip component to extract files from a ZIP file.
'
' Arguments:
' myZip [string] the fully qualified path to the ZIP file
' myTargetDir [string] the directory where the extracted files will be located
' myFileSpec [string] the file(s) to be extracted, wildcards allowed
'
' Written by Rob van der Woude
' http://www.robvanderwoude.com
'
' The X-zip component is available at:
' http://www.xstandard.com/en/documentation/xzip/
' For more information on available functionality read:
' http://www.xstandard.com/printer-friendly.asp?id=C9891D8A-5390-44ED-BC60-2267ED6763A7
Dim objZip, objItem
Set objZip = CreateObject("XStandard.Zip")
For Each objItem In objZip.Contents(ZipFile)
'WScript.Echo ZipFile & "," & objItem.Path & objItem.Name
If InStr(objItem.Name, ".") Then
fileOutput.WriteLine Char(34) & ZipFile & Chr(34) & "," & objItem.Path & objItem.Name & "," & objItem.Size & "," & objItem.Date
End If
Next
Set objZip = Nothing
Set objItem = Nothing
End Function
Sub ShowSubFolders(objFolder)
Dim colFolders, objSubFolder
Set colFolders = objFolder.SubFolders
For Each objSubFolder In colFolders
'WScript.Echo objSubFolder.Path
'WScript.Echo objSubFolder
Set colFiles = objSubFolder.Files
For Each objFile In colFiles
If Right(objFile, 4) = ".jar" Then
'WScript.Echo objFile.Name
'WScript.Echo objFile.Path
ZipContents objFile.Path
End If
Next
ShowSubFolders(objSubFolder)
Next
End Sub
Jar,location_and_file,size,file_date
C:\Tomcat 5.0\bin\bootstrap.jar,META-INF/MANIF EST.MF,277 ,8/28/2004 19:59
C:\Tomcat 5.0\bin\bootstrap.jar,org/apache/cat alina/laun cher/Catal inaLaunchF ilter.clas s,1648,8/2 8/2004 19:59
C:\Tomcat 5.0\bin\bootstrap.jar,org/apache/cat alina/load er/Reloade r.class,24 8,8/28/200 4 19:59
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)