I try to list the contents of folder by using the FileSystemObject Library the
run-time error '-2147319779(8002801d)'; automation error library not registered
is appears but
i use the same application in another computer and its run
i check the
reference microsoft scripting runtime
the code
Code:
Dim FSO As New FileSystemObject
Dim FileInFolder As Files
Dim FileName As File
Dim I As Integer
Dim FolderInPath As String
Private Sub Command1_Click()
Set FileInFolder = FSO.GetFolder("C:\Program Files\NowSMS\SMS-IN").Files
For Each FileName In FileInFolder
List1.AddItem FileName
DoEvents
Next
For I = 0 To List1.ListCount - 1
FolderInPath = Replace(List1.List(I), "C:\Program Files\NowSMS\SMS-IN\", App.Path & "\CopyOf(SMS-IN)\" & "(" & I & ")")
FSO.CopyFile List1.List(I), FolderInPath, False
Next I
End Sub
deco