TransferText question

M

magmike

In using TransferText to append a tab delimited to a table, how would
I format strFileName with multiple file names and get it to work
correctly?

i.e. for one file:

strFileName = "C:\Documents and Settings\Mike\ImportData.txt"

How could I format that line for multiple files to be imported?

Currently I am using Dir("C:\Documents and Settings\Mike\Import
\*.txt") and looping, but this requires the user to be mindful enough
to erase or move the old files and put the new ones (this is a monthly
task that involves deleting the old data and importing the new months
data for comparison) in that particular folder. I'd like them to be
able to keep all their files, new and old in that same folder. Now
that I have figured out how to allow the user to browse and select the
files they want - and capture those paths, is there a way to use
multiple file paths in one TransferText command? or a way to loop
through a list of paths instead of all files in the folder? or a
different/better way to accomplish this altogether?

Thanks in advance for your help!
magmike
 
J

John Spencer

If you can use the date and time that the file was last modified (created) then
FileDateTime(strFileName)
may be helpful.

Or if you have some other way of distinguishing the new files from the old
files by the name of the files.

If you have all these files in one folder, how would a human be able to
distinguish the "new" files from the "old" files?

Another method would be to store the names of files that you have imported in
a table. However, that method means that the file names will be unique and
not duplicated.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 

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