[AccessD] Importing Multiple Text Files From Specified Folder

Paul Hartland (ISHARP) paul.hartland at isharp.co.uk
Thu Dec 2 10:41:53 CST 2004


Thanks, I hit the send button and the obvious answer came to me...Hate it
when I do that.

Paul

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brett Barabash
Sent: 02 December 2004 16:28
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Importing Multiple Text Files From Specified Folder


Dim strFile As String

strFile = Dir$("c:\mypathname\*.txt")

Do until strFile = ""
    'File import code goes here, using strFile filename

    strFile = Dir$
Loop

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Paul Hartland
(ISHARP)
Sent: Thursday, December 02, 2004 10:08 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Importing Multiple Text Files From Specified Folder

To all,
 
I have a folder with around 100+ text files thaht I need to import into a
single table in an access database, is there anyway I can loop through all
files with a .txt extension and automatically import them one by one into my
table....
 
Thanks in advance for any help, suggesstions & sample code etc
 
PAUL HARTLAND
Database Designer/Programmer
paul.hartland at isharp.co.uk
ISHARP
DDI - 01922 472031
Mobile - 07730 523179

 

ISHARP (Information Services for Hospitality, Audit, Retail and
Pharmacy) provide IT resources for the Christie Group Stock & Inventory
Services companies.


----------------------------------------------------------------------------
----------------------------------------
The information in this email may contain confidential information that 
is legally privileged. The information is only for the use of the intended 
recipient(s) named above. If you are not the intended recipient(s), you 
are hereby notified that any disclosure, copying, distribution, or the
taking 
of any action in regard to the content of this email is strictly prohibited.
If 
transmission is incorrect, unclear, or incomplete, please notify the sender 
immediately. The authorized recipient(s) of this information is/are
prohibited 
from disclosing this information to any other party and is/are required to 
destroy the information after its stated need has been fulfilled.

Any views expressed in this message are those of the individual sender,
except where the sender specifies and with authority, states them to be the
views of Tappe Construction Co.

This footer also confirms that this email message has been scanned for the
presence of computer viruses.Scanning of this message and addition of this
footer is performed by SurfControl E-mail Filter software in conjunction
with virus detection software.

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list