473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Import files from C:\

31
I am trying to import all files from a directory on my hard drive. The file names start with the same letters ie.. AB but the are sequenced ie AB001, AB002 when they are created. I want to look for the new files and import them. Can this be done?
thanks
Sep 25 '07 #1
4 1304
TSIGOS1
24
it can be done of course, but you need to used the command dir$(AB*.txt). check out help section.
Sep 25 '07 #2
Wayne L
31
it can be done of course, but you need to used the command dir$(AB*.txt). check out help section.
thanks I figured it out
Oct 1 '07 #3
missinglinq
3,532 Expert 2GB
Forum etiquette requires that when a question that you've posted is resolved, off line, as it were, that you make the answer available. This allows other members/visitors to the forum, who may be researching a similar problem, to be enlightened!

Welcome to TheScripts!

Linq ;0)>
Oct 1 '07 #4
Wayne L
31
Ok this is the final for exporting .dbf files and exporting only the lates file created.


Private Sub Mass_Import_Click()
Dim strPath As String
Dim strmsg As String
Dim strFile1Name As String
Dim strFile2Name As String
Dim dbs As Database

Set dbs = CurrentDb
'DoCmd.RunMacro ("delete name of table in access") ' macro delete object
'Set the path to the directory where the files will be.
ChDir ("C:\FOLDER")
strPath = "C:\FOLDER\"
strFile1Name = Dir("XXX*.dbf")
Do While Len(strFile1Name) > 0
strFile2Name = strFile1Name
strFile1Name = Dir
Loop
DoCmd.TransferDatabase acImport, "dBase IV", strPath, acTable, strFile2Name, "Name of table in access", False
strmsg = "Sucessfully Imported " & strPath & strFile2Name
MsgBox (strmsg)

End Sub
Oct 2 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Olivier Noblanc ATOUSOFT | last post by:
Hello, When i want to import a .py fire from another subdirectory i make import inc/setupxml but that make me an error message.
1
by: mirandacascade | last post by:
O/S: Windows 2K Vsn of Python: 2.4 Currently: 1) Folder structure: \workarea\ <- ElementTree files reside here \xml\ \dom\
1
by: Dan | last post by:
Could someone please help me with auto importing a series of data files into an Access table. I tried to follow code given below in a previous messagebut i'm getting error messages. Here's my...
2
by: musicloverlch | last post by:
I need to import 60 text files all in one folder. Can I use VBA to cycle through all the files, without having to import them one by one? Does anyone have an example? Thanks in advance. Laura
3
by: ninrulz | last post by:
I will try to explain my situation. I know that it is hard to offers solutions without fully understanding what people would like to achieve. I receive 2 csv files every month. The csv files...
7
by: Pete | last post by:
I need to import multiple tab delimited files for which I do not have the formats. All files have column headers in the the line. The files must be dynamic. The only common value is that the...
49
by: Martin Unsal | last post by:
I'm using Python for what is becoming a sizeable project and I'm already running into problems organizing code and importing packages. I feel like the Python package system, in particular the...
3
by: SMALLp | last post by:
Hy! I'm new in Linux, and i feel little less newer in python. I need advice and help. I'm making an application witch purpose is irrelevant. It has a lot of code for now and I've only made...
0
by: Victor Lin | last post by:
Hi, I got some problem with import. I have some python file that should be executed. Something like unit-test or other small tool. The project is not so small. So I want to separate these files...
6
by: provor | last post by:
Hello, I have the following code that I am using when a user presses a button to import an excel file into a table. The code is hard coded to point to the correct table. This works great for this...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.