File Name Rules

11-19-2014 01:45 PM
New Contributor

What should or should not appear in an ArcGIS file name.  I have some data that has dashes in the file name and it does not read correctly.  Rename the file without the dash and it works great.  Any suggestions?

0 Kudos
2 Replies
MVP Esteemed Contributor

letters numbers and the underscore, no spaces and shouldn't begin with a number...although these are suggestions and it often depends upon what type of file you are trying to name.  some things are worse than others (ie. ESRI grids) and sometimes the path is the problem (particularly spaces in paths for some file types).  let the debate begin

Esri Esteemed Contributor

I think the first problem is with the definition of "ArcGIS file name" itself -- there is no one such thing.  ArcGIS applications interact with many named objects, and some of them have stricter naming rules than others (databases generally being the strictest, requiring that columns conform to SQL identifiers).  And yet there are also many exceptions and overrides available, only some of which are usable from ArcGIS.

Generally speaking, you will have the least trouble if you keep your identifiers as short as possible, avoid mixed-case naming, and limit the first character to alpha (ASCII-7), and the other characters to "alphanumeric plus underscore".  File names can generally include a hyphen, but they should be avoided for field identifiers, since parsers are likely to attempt subtraction on the dash-separated portions of a name.

Beyond that, it wouldn't hurt to know the absolute limits of identifier length in each data format you use (10 for dBase, 30 for Oracle (UPPERCASE ONLY),...), so that when you experience truncation, you can at least recognize it as the problem.  Also of use would be to understand how UTF-8 encoding works, so that you can distinguish between codepoint count and byte length when evaluating naming limits.

- V

0 Kudos