Doing ant "-DPROP=dir with space" would yield the same error... BTW, if
anyone knows how to get the short name (with the ~) for the current
directory and can assign it to a variable I'd be grateful. It's
somewhat unrelated to ant, but it's nice to have this working with ant
script so we can all pass in path name as argument. The dir /x would
list the name fine but here is what I'm doing:
for /F "eol=; delims=," %%f in ('cd') do (
set TARGET_DIR=%%f
)
ant -DTARGET_DIR=%TARGET_DIR%
etc...
'cd' would yield the full path name. What I did here is to assign the
current directory to the TARGET_DIR variable and pass it to the ant
script. This works perfectly fine if the directory doesn't have space
in it. Does anyone know how I can convert the long name to short name?
Will
Nico Seessle wrote:
>
> ----- Original Message -----
> From: "William Lee" <[EMAIL PROTECTED]>
> To: "Ant User" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 16, 2001 5:16 AM
> Subject: Passing in -D argument with space to the ant.bat script
>
> > The "ant.bat" script that comes with Ant 1.2 doesn't seem to support -D
> > options with space in it. For example, I can do:
> >
> > c:\> ant -DPROP="dir with space"
> >
> > I'll get:
> >
> > with was unexpected at this time.
> >
> Can you try out
>
> c:\> ant "-DPROP=dir with space"?
>
> Looks funny, but may work better...
>
> Nico