Not really an Access question, but ...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

his is not really an Access question but I can't find any Windows newsgroups
in MSDN. Its related to Access in that I need to read in a table of file
paths and load them to another Access table. The problem is I need to get the
results of a Windows 2000 file search ("Name" and "In folder") columns into
an Access table so that I can process them. Does anyone know a way to capture
these results in text form so I can get them into an Access database?
 
Hi Rupert,

I'd just open a command prompt and do something like this (all one
command)

DIR C:\*.mdb /B /S | perl -pe " s/^(.+)\\([^\\]+)/$2\t$1/" >
C:\temp\filelist.txt

which puts the list of filenames and paths into a tab-delimited textfile
ready for Access to import.

If you don't have or can't install Perl on your system, use something
like this
DIR C:\*.mdb /B /S > C:\temp\filelist.txt
and then import the result and use a query to parse the filename off the
end of each record.
 
Back
Top