Can't import dbase IV files

C

Cate

When I try to import .dbf files that are dbase IV in
Access 2000 I get the error message "microsoft jet could
not find the object.....". Help

Cate
 
J

John Nurick

Copy them to another folder with short names, something like this air
code, which will require a reference (Tools|References) to the Microsoft
Scripting Runtime library

Sub CopyWShortNames
Dim fso As Scripting.FileSystemObject
Dim foSrc As Scripting.Folder
Dim F As Scripting.File
Dim strDest As String

Set fso = CreateObject("Scripting.FileSystemObject")

Set foSrc = fso.GetFolder("D:\folder\folder")
strDest = "D:\folder\otherfolder\"

For Each F In foSrc.Files
If UCase(Right(F.Name, 4)) = ".DBF" Then
F.Copy strDest & F.ShortName
End If
Next

Set F = Nothing
Set foSrc = Nothing
Set fso = Nothing
End Sub




I think I discovered the problem. The file name is more
than 8 characters. I renamed one down to 8 characters and
it loaded. Well....I have over 300 files to load. Any
suggestions?

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
C

Cate

If anyone runs into this check to see that your file name
is only 8 characters. Anything longer and this too shall
be your fate.

Cate
 
C

Cate

I found a very cool web site with freeware that will
rename files is a great utility. Check it out..www.1-
4a.com/rename/index.html

Cate
-----Original Message-----
Copy them to another folder with short names, something like this air
code, which will require a reference (Tools|References) to the Microsoft
Scripting Runtime library

Sub CopyWShortNames
Dim fso As Scripting.FileSystemObject
Dim foSrc As Scripting.Folder
Dim F As Scripting.File
Dim strDest As String

Set fso = CreateObject("Scripting.FileSystemObject")

Set foSrc = fso.GetFolder("D:\folder\folder")
strDest = "D:\folder\otherfolder\"

For Each F In foSrc.Files
If UCase(Right(F.Name, 4)) = ".DBF" Then
F.Copy strDest & F.ShortName
End If
Next

Set F = Nothing
Set foSrc = Nothing
Set fso = Nothing
End Sub




I think I discovered the problem. The file name is more
than 8 characters. I renamed one down to 8 characters and
it loaded. Well....I have over 300 files to load. Any
suggestions?

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top