Working with .DAT file extensions

J

Joeb

I am working on an Access database in which I will need
to import about 15 files that have .DAT extensions. I
cannot import them directly to Access and I can't see a
quick way to change the file extensions to .TXT in
Explore. I would like to have a process that is as
automated as possible since I will be doing this weekly
and the number of files could expand substantially.

Any help would be greatly appreciated

Thanks...Joe
 
R

Roger Carlson

Well if you know what the file names will be (that is, if they will always
be the same) you can Rename them using Access:

Name "C:\test\OriginalFile.DAT" As "C:\test\OriginalFile.TXT"

or the FileCopy command to leave the original intact:

FileCopy "C:\test\OriginalFile.DAT" , "C:\test\OriginalFile.TXT"
 
G

Guest

Roger,

Thanks for the response. I appreciate your help.

I didn't fully understand the solution you described. I
assume that the commands you suggest are to be used
within a macro or module but I am not very familiar with
VBA as yet.

I decided to change my registry as was suggested by John
Nurick and it appears to have worked.

Thanks again for your help.
....Joe
-----Original Message-----
Well if you know what the file names will be (that is, if they will always
be the same) you can Rename them using Access:

Name "C:\test\OriginalFile.DAT" As "C:\test\OriginalFile.TXT"

or the FileCopy command to leave the original intact:
FileCopy "C:\test\OriginalFile.DAT" , "C:\test\OriginalFil
e.TXT"
 
G

Guest

Hi John,

Thank you for the response. I adjusted the registry as
described and I can now import the DAT files.

I tried to be careful as you warned. It seems like every
issue I come to these newsgroups with, is, or can be
resolved by changing the registry. Is there a resource
available that describes the parts of the registry and
would help me understand what it does (and how.)

Any help would be appreciated.
Thanks again.
....Joe
-----Original Message-----
Hi Joe,

This http://support.microsoft.com/default.aspx? scid=kb;en-us;304206
shows how to change the extensions that Access will accept. The neatest
method is the last, editing the registry (provided
you're careful said:
This http://support.microsoft.com/default.aspx? scid=kb;EN-GB;306144
includes code that automatically makes a copy of the textfile with a
..txt extension and imports that.

I am working on an Access database in which I will need
to import about 15 files that have .DAT extensions. I
cannot import them directly to Access and I can't see a
quick way to change the file extensions to .TXT in
Explore. I would like to have a process that is as
automated as possible since I will be doing this weekly
and the number of files could expand substantially.

Any help would be greatly appreciated

Thanks...Joe

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
J

John Nurick

Hi Joe,

I'm sure there are various descriptions of the registry on the internet,
though I've never gone looking for one.

Hi John,

Thank you for the response. I adjusted the registry as
described and I can now import the DAT files.

I tried to be careful as you warned. It seems like every
issue I come to these newsgroups with, is, or can be
resolved by changing the registry. Is there a resource
available that describes the parts of the registry and
would help me understand what it does (and how.)

Any help would be appreciated.
Thanks again.
...Joe
-----Original Message-----
Hi Joe,

This http://support.microsoft.com/default.aspx? scid=kb;en-us;304206
shows how to change the extensions that Access will accept. The neatest
method is the last, editing the registry (provided
you're careful said:
This http://support.microsoft.com/default.aspx? scid=kb;EN-GB;306144
includes code that automatically makes a copy of the textfile with a
..txt extension and imports that.

I am working on an Access database in which I will need
to import about 15 files that have .DAT extensions. I
cannot import them directly to Access and I can't see a
quick way to change the file extensions to .TXT in
Explore. I would like to have a process that is as
automated as possible since I will be doing this weekly
and the number of files could expand substantially.

Any help would be greatly appreciated

Thanks...Joe

--
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