Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "Mike Schilling" Newsgroups: comp.lang.java.programmer Subject: Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Date: Tue, 29 May 2012 07:31:40 -0700 Organization: A noiseless patient Spider Lines: 18 Message-ID: References: Injection-Date: Tue, 29 May 2012 14:31:47 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="0spM4Bd78d7k9za4qkLjFQ"; logging-data="7579"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1943nwftRGe71OKwBQ6DDVlthIXj0AD9uM=" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Response X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 Cancel-Lock: sha1:5Pubx38E0+SKogFcDvpB39ErhV8= X-Priority: 3 X-MSMail-Priority: Normal Xref: csiph.com comp.lang.java.programmer:14885 "bilsch" wrote in message news:jq2eme$o07$1@dont-email.me... > I'm writing a DOS script that uses pathnames with the well known Windows > directory 'My Documents'. The name has a space in it that causes javac and > java commands to choke. Neither of the following works: > 'My Documents' (single quotes) or My\ Documents (escape the space). > Here is an example: > > javac -d C:/Users/Owner/'My Documents'/NetBeansProjects/%1/build/classes > > Can anyone tell me the workaround for this? Two things to try: 1. Use double-quotes instead of single ones. 2. Use "dir /x" to discover the short name for "My Documents" (I'd guess it's MYDOCU~1) and use that instead.