File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -377,14 +377,22 @@ Else
377377 If objFileSystemObject.FolderExists(strScriptDir & strSubfolderName & "\" ) Then
378378 Set objFolder = objFileSystemObject.GetFolder(strScriptDir & strSubfolderName & "\" )
379379 Set objADODBRecordSet = CreateObject( "ADODB.RecordSet" )
380- objADODBRecordSet.Fields.Append "FilePath" , adVarChar, 255
380+ objADODBRecordSet.Fields.Append "FilePath" , adVarChar, 300
381381 objADODBRecordSet.CursorType = adOpenStatic
382382 objADODBRecordSet.Open
383383 Set arrFiles = objFolder.Files
384384 For Each objFile in arrFiles
385+ On Error Resume Next
385386 objADODBRecordSet.AddNew "FilePath" , objFile.Path
386387 'objADODBRecordSet.Fields(0) = objFile.Path
387388 objADODBRecordSet.Update
389+ If Err Then
390+ On Error Goto 0
391+ Err.Clear
392+ WScript.Echo( "An error occurred processing the file: " & objFile.Path)
393+ Else
394+ On Error Goto 0
395+ End If
388396 Next
389397 objADODBRecordSet.Sort = "FilePath"
390398 If objADODBRecordSet.BOF = False Then objADODBRecordSet.MoveFirst()
You can’t perform that action at this time.
0 commit comments