Re: Importing multiple files..



Kathie via AccessMonster.com wrote:
Hello,
I have to import monthly, files that were once *.csv but due to commas in
addresses, the interface program was changed to dump tab delimited. Now my
code is not finding the files in the folder? The code is below - can anyone
help? (The files still are named with the extension of *.csv)
<SNIP>
' the pathname of the folder that contains the files for import
strInputDir = "S:\Council\APPS\GENETICS\CURRENT\"
<SNIP>
strImportFile = Dir(strInputDir & "\*" & strFileExt)
Set db = CurrentDb
<SNIP>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The path name has 2 \ characters after the concatenation:

S:\Council\APPS\GENETICS\CURRENT\\*.csv

Change this:

strImportFile = Dir(strInputDir & "\*" & strFileExt)

to this:

strImportFile = Dir(strInputDir & "*" & strFileExt)

Or, change this:

strInputDir = "S:\Council\APPS\GENETICS\CURRENT\"

to this:

strInputDir = "S:\Council\APPS\GENETICS\CURRENT"

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRAS2H4echKqOuFEgEQImAgCfeajWeKkITIIlQaRNHUysDlEQKqkAn0k+
zO36ktKiywydxsDUN5tzOSvh
=eTF2
-----END PGP SIGNATURE-----
.



Relevant Pages

  • Re: How to read files with commas as separators?
    ... of concatenated commas, it will BACKSPACE once before reading the next ... It does say BACKSPACE is illegal with list directed output, ...
    (comp.lang.fortran)
  • Re: CSV file
    ... This is why real CSV uses quotes around ... CSV is a plain text format, there is no way to bold anything. ...
    (perl.beginners)
  • Re: HHTC EvSA T1 selections
    ... It's a lot easier for me if your entries are in the form of a line of ... names separated by commas. ... Rodney Ulyate ...
    (rec.sport.cricket)
  • Re: InterSheet for RISC OS
    ... Intersheet format, ... ... but I do have a selection of Impression loaders ... including for CSV, CSV+, IWord, WordWise+. ...
    (comp.sys.acorn.apps)
  • Re: Educating Ogilvie
    ... Malcolm wrote: ... when you enclose some words in inverted ... commas, they are meant to be an accurate quote of what someone has said. ...
    (uk.environment.conservation)