When importing a csv file into Access 2010, what are the guidlines for the file name? number of characters, special characters within name
When importing a csv file into Access 2010, what are the guidlines for the file name? number of characters, special characters within name
Certain media that may store the file could have some restrictions that may not apply to, say, Access 2003 with XP. In other words, HDD's formatted with NTFS compared to older formats of the FAT16 and FAT32 flavors may encounter file name conflicts. That aside, I would consider characters that would goof up a string variable. So with some clever concatanation you could probably include a few special characters in the file name. I think you can include dots in file names if enclosed in parenthesssis, in the name. Don't recall what character count limits are.
If you predict conflicts you could create a SHELL object and call on some functions to copy and paste your CSV files so they have a different name before importing. Loop through a specified directory and locate all .csv files, copying, pasting, and killing as you go.
I do not use special characters except the underscore and sometimes a space. (spaces in names are always a problem)
I try to keep the file name portion descriptive but short.
Here is an example: Adds_ABA_Hours1210.csv
The number of characters is controlled by Windows. Depending on where you look, the max length is between 199 and 257 characters.
(for your reading pleasure: http://stackoverflow.com/questions/2...-windows-vista
Personally, I would try and keep the file name length less than 30.
Thanks for both of your suggestions.
The csv file I'm importing is system generated, with a system generated name. The name includes everything, alpha characters, numeric characters, and special characters. The import was failing due to a "(##)" within the name. I deleted the "(" & ")" and it imported correctly.
In writing VBA, I've decided to make a copy of the file with a very simple name, import the simple named file, then delete the simple named file.
Thanks again for your assistance.