"\" is used as the quoting character, this is often used to deal with path
names with spaces, instead of breaking the path into two command line args
(otherwise it would not know where dsn= ended and the next option [in this
case one called output=] began). to get a literal "\" you either need to
quote it (with itself) like "\\" or put the whole thing in "double
quotes".
for example: `dir=C:\\Program\ Files\\` or `dir="C:\Program Files\"
So the computer sees "D:\Data" with a literal "D", and it becomes
translated to "D:Data".
Solution: always "quote" filenames, or use the "/" workaround.
{{{
db.in.ogr dsn="D:\Data\ProjData\GRASS_db\dmp_lg.csv" output=test
}}}
#1301: wingrass: db.in.ogr fails to load .csv file
------------------------+---------------------------------------------------
Reporter: morrisxs09 | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Database | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows XP
Cpu: x86-32 |
------------------------+---------------------------------------------------
Comment(by morrisxs09):
I'm using the winGRASS gui i.e.
File > Import database table > Multiple import formats using OGR
Window pops up
. On the "Required" tab, select "Browse" button on the "Table file to be
imported or DB connection string" to navigate to .csv file and select
required file to load.
. Enter any other required fields on the other tabs
. Press "Run"
error occurs
Are you suggesting quotes have to be added after the "Table file to be
imported or DB connection string" field is populated?
Replying to [comment:2 morrisxs09]:
> Are you suggesting quotes have to be added after the "Table
> file to be imported or DB connection string" field is populated?
try it. if that makes it work, then yes.
if so, the root of the problem is that the path strings are not getting
quoted automatically by the file-picker?
ah, I think I found it, unquoted variables inside the shell script.
Hopefully fixed in r45609 (6.4) and r45610 (6.5).
for today, avoid the problem with "cd D:\Data\ProjData?\GRASS_db" on the
command line and then run db.in.ogr with dsn=dmp_lg.csv, or the "/"
workaround.