Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #14877 > unrolled thread
| Started by | bilsch <bilsch01@gmail.com> |
|---|---|
| First post | 2012-05-29 05:16 -0700 |
| Last post | 2012-05-29 12:59 -0700 |
| Articles | 18 — 9 participants |
Back to article view | Back to comp.lang.java.programmer
Space in 'My Documents' directory not fixed by quoting or \ escaping bilsch <bilsch01@gmail.com> - 2012-05-29 05:16 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Silvio Bierman <silvio@moc.com> - 2012-05-29 14:32 +0200
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Nigel Wade <nmw@ion.le.ac.uk> - 2012-05-29 13:58 +0100
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Lew <noone@lewscanon.com> - 2012-05-29 07:06 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Gene Wirchenko <genew@ocis.net> - 2012-05-29 09:27 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Lew <lewbloch@gmail.com> - 2012-05-29 14:07 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-05-29 21:43 +0000
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Jim Janney <jjanney@shell.xmission.com> - 2012-05-29 16:37 -0600
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Gene Wirchenko <genew@ocis.net> - 2012-05-29 14:55 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping bilsch <bilsch01@gmail.com> - 2012-05-29 16:06 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Lew <noone@lewscanon.com> - 2012-06-02 09:31 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Gene Wirchenko <genew@ocis.net> - 2012-06-03 19:23 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping bilsch <bilsch01@gmail.com> - 2012-05-29 12:55 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping Nigel Wade <nmw@ion.le.ac.uk> - 2012-05-30 10:30 +0100
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping bilsch <bilsch01@gmail.com> - 2012-05-29 12:54 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping bilsch <bilsch01@gmail.com> - 2012-05-29 12:50 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping "Mike Schilling" <mscottschilling@hotmail.com> - 2012-05-29 07:31 -0700
Re: Space in 'My Documents' directory not fixed by quoting or \ escaping bilsch <bilsch01@gmail.com> - 2012-05-29 12:59 -0700
| From | bilsch <bilsch01@gmail.com> |
|---|---|
| Date | 2012-05-29 05:16 -0700 |
| Subject | Space in 'My Documents' directory not fixed by quoting or \ escaping |
| Message-ID | <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? TIA Bill S.
[toc] | [next] | [standalone]
| From | Silvio Bierman <silvio@moc.com> |
|---|---|
| Date | 2012-05-29 14:32 +0200 |
| Message-ID | <4fc4c1cb$0$6931$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #14877 |
On 05/29/2012 02:16 PM, bilsch wrote: > 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? > > TIA Bill S. Not really Java related but anyway: in DOS/Windows you need to quote the complete path like "C:/My Documents/Pictures/abc.WMV" etc. Silvio
[toc] | [prev] | [next] | [standalone]
| From | Nigel Wade <nmw@ion.le.ac.uk> |
|---|---|
| Date | 2012-05-29 13:58 +0100 |
| Message-ID | <a2jvh9FuhU1@mid.individual.net> |
| In reply to | #14879 |
On 29/05/12 13:32, Silvio Bierman wrote: > On 05/29/2012 02:16 PM, bilsch wrote: >> 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? >> >> TIA Bill S. > > Not really Java related but anyway: in DOS/Windows you need to quote the > complete path like "C:/My Documents/Pictures/abc.WMV" etc. > it's often very convenient to use tab expansion of paths (both in Windows cmd shell, and UNIX/Linux bash shell). This would have discovered the correct path for the OP. For example, enter in the cmd.exe: javac -d C:\Users\Owner\My then hit tab. Windows will do the rest, even adding appropriate quotes where necessary. Note that you must use the Windows \ path separator for this to work. -- Nigel Wade
[toc] | [prev] | [next] | [standalone]
| From | Lew <noone@lewscanon.com> |
|---|---|
| Date | 2012-05-29 07:06 -0700 |
| Message-ID | <jq2l4h$2kl$2@news.albasani.net> |
| In reply to | #14880 |
Nigel Wade wrote: > Silvio Bierman wrote: >> bilsch wrote: >>> 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? >>> >>> TIA Bill S. >> >> Not really Java related but anyway: in DOS/Windows you need to quote the >> complete path like "C:/My Documents/Pictures/abc.WMV" etc. >> > > it's often very convenient to use tab expansion of paths (both in Windows cmd > shell, and UNIX/Linux bash shell). This would have discovered the correct path > for the OP. For example, enter in the cmd.exe: > > javac -d C:\Users\Owner\My > > then hit tab. Windows will do the rest, even adding appropriate quotes where > necessary. Note that you must use the Windows \ path separator for this to work. "/" is a Windows path *element* separator. ";" is the path separator in Windows. Windows is fine with forward slashes in paths. I suspect the "%1" expansion. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-05-29 09:27 -0700 |
| Message-ID | <23u9s7tr13usskfhim78anlj5g8pe3q9l1@4ax.com> |
| In reply to | #14884 |
On Tue, 29 May 2012 07:06:31 -0700, Lew <noone@lewscanon.com> wrote:
>Nigel Wade wrote:
[snip]
>> it's often very convenient to use tab expansion of paths (both in Windows cmd
>> shell, and UNIX/Linux bash shell). This would have discovered the correct path
>> for the OP. For example, enter in the cmd.exe:
>>
>> javac -d C:\Users\Owner\My
>>
>> then hit tab. Windows will do the rest, even adding appropriate quotes where
>> necessary. Note that you must use the Windows \ path separator for this to work.
>
>"/" is a Windows path *element* separator. ";" is the path separator in Windows.
>
>Windows is fine with forward slashes in paths. I suspect the "%1" expansion.
But since using "/" as a path element seprator in a command line
will cause trouble, people tend to avoid using them as such.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2012-05-29 14:07 -0700 |
| Message-ID | <899d499e-c1ad-4863-b941-575aaaac1c4b@googlegroups.com> |
| In reply to | #14890 |
Gene Wirchenko wrote: > Lew wrote: >> Gene Wirchenko wrote: >>> then hit tab. Windows will do the rest, even adding appropriate quotes where >>> necessary. Note that you must use the Windows \ path separator for this to work. >> >>"/" is a Windows path *element* separator. ";" is the path separator in Windows. >> >>Windows is fine with forward slashes in paths. I suspect the "%1" expansion. > > But since using "/" as a path element seprator in a command line > will cause trouble, people tend to avoid using them as such. That is interesting to me. What trouble? I have used forward slashes as path element separators in Windows command-line commands. I don't recall that it caused any trouble. I'm always learning from this forum. -- Lew
[toc] | [prev] | [next] | [standalone]
| From | glen herrmannsfeldt <gah@ugcs.caltech.edu> |
|---|---|
| Date | 2012-05-29 21:43 +0000 |
| Message-ID | <jq3fua$heb$1@speranza.aioe.org> |
| In reply to | #14912 |
Lew <lewbloch@gmail.com> wrote: (snip) >> But since using "/" as a path element seprator in a command line >> will cause trouble, people tend to avoid using them as such. > That is interesting to me. What trouble? > I have used forward slashes as path element separators in Windows > command-line commands. I don't recall that it caused any trouble. The system calls, such as OPEN, accept either / or \. (C programmers use / for #include files, knowing it will work on unix or DOS/Windows, at least since DOS 3.2.) The system command line utilities, such as DIR and COPY use / for options, and won't accept it as part of a file path. Other command line utilities (that don't come with DOS/Windows) that don't use / for options likely will accept /. The Sourceforge UNXUTILS, unix-like utilities for WIN32, for example, should accept /. -- glen
[toc] | [prev] | [next] | [standalone]
| From | Jim Janney <jjanney@shell.xmission.com> |
|---|---|
| Date | 2012-05-29 16:37 -0600 |
| Message-ID | <ydnsjeiipgz.fsf@shell.xmission.com> |
| In reply to | #14915 |
glen herrmannsfeldt <gah@ugcs.caltech.edu> writes: > Lew <lewbloch@gmail.com> wrote: > > (snip) >>> But since using "/" as a path element seprator in a command line >>> will cause trouble, people tend to avoid using them as such. > >> That is interesting to me. What trouble? > >> I have used forward slashes as path element separators in Windows >> command-line commands. I don't recall that it caused any trouble. > > The system calls, such as OPEN, accept either / or \. > (C programmers use / for #include files, knowing it will work > on unix or DOS/Windows, at least since DOS 3.2.) > > The system command line utilities, such as DIR and COPY use / for > options, and won't accept it as part of a file path. > > Other command line utilities (that don't come with DOS/Windows) > that don't use / for options likely will accept /. > > The Sourceforge UNXUTILS, unix-like utilities for WIN32, > for example, should accept /. In early versions of MS-DOS you could put a line in CONFIG.SYS to set the switch character to something else, usually -, which then freed up / for use in file names. This eventually went away, I don't remember exactly when. The problem was never in the API but in user code that parsed command lines. -- Jim Janney
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-05-29 14:55 -0700 |
| Message-ID | <p5has759jpj1tpfhpm2ibba88fe4kdiria@4ax.com> |
| In reply to | #14912 |
On Tue, 29 May 2012 14:07:29 -0700 (PDT), Lew <lewbloch@gmail.com>
wrote:
>Gene Wirchenko wrote:
>> Lew wrote:
>>> Gene Wirchenko wrote:
>>>> then hit tab. Windows will do the rest, even adding appropriate quotes where
>>>> necessary. Note that you must use the Windows \ path separator for this to work.
>>>
>>>"/" is a Windows path *element* separator. ";" is the path separator in Windows.
>>>
>>>Windows is fine with forward slashes in paths. I suspect the "%1" expansion.
>>
>> But since using "/" as a path element seprator in a command line
>> will cause trouble, people tend to avoid using them as such.
>
>That is interesting to me. What trouble?
>
>I have used forward slashes as path element separators in Windows
>command-line commands. I don't recall that it caused any trouble.
I checked with Windows XP just before posting. The CLI did not
like
dir /download
and no wonder since "/" is used in many command-line programs for
indicating parameters. Windows 7 behaves the same way. (I just
checked.)
It is easier to just use backslashes and not have to worry if
slash is acceptable in the current context. I prefer just typing and
not having to think about typing.
>I'm always learning from this forum.
So do I.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | bilsch <bilsch01@gmail.com> |
|---|---|
| Date | 2012-05-29 16:06 -0700 |
| Message-ID | <jq3kph$cca$1@dont-email.me> |
| In reply to | #14918 |
On 5/29/2012 2:55 PM, Gene Wirchenko wrote: > On Tue, 29 May 2012 14:07:29 -0700 (PDT), Lew<lewbloch@gmail.com> > wrote: > >> Gene Wirchenko wrote: >>> Lew wrote: >>>> Gene Wirchenko wrote: >>>>> then hit tab. Windows will do the rest, even adding appropriate quotes where >>>>> necessary. Note that you must use the Windows \ path separator for this to work. >>>> >>>> "/" is a Windows path *element* separator. ";" is the path separator in Windows. >>>> >>>> Windows is fine with forward slashes in paths. I suspect the "%1" expansion. >>> >>> But since using "/" as a path element seprator in a command line >>> will cause trouble, people tend to avoid using them as such. >> >> That is interesting to me. What trouble? >> >> I have used forward slashes as path element separators in Windows >> command-line commands. I don't recall that it caused any trouble. > > I checked with Windows XP just before posting. The CLI did not > like > dir /download > and no wonder since "/" is used in many command-line programs for > indicating parameters. Windows 7 behaves the same way. (I just > checked.) > > It is easier to just use backslashes and not have to worry if > slash is acceptable in the current context. I prefer just typing and > not having to think about typing. > >> I'm always learning from this forum. > > So do I. > > Sincerely, > > Gene Wirchenko Forward slash works
[toc] | [prev] | [next] | [standalone]
| From | Lew <noone@lewscanon.com> |
|---|---|
| Date | 2012-06-02 09:31 -0700 |
| Message-ID | <jqdf5i$9qr$1@news.albasani.net> |
| In reply to | #14926 |
bilsch wrote: > Gene Wirchenko wrote: >> Lew wrote: >> >>> Gene Wirchenko wrote: >>>> Lew wrote: >>>>> Gene Wirchenko wrote: >>>>>> then hit tab. Windows will do the rest, even adding appropriate quotes >>>>>> where >>>>>> necessary. Note that you must use the Windows \ path separator for this >>>>>> to work. >>>>> >>>>> "/" is a Windows path *element* separator. ";" is the path separator in >>>>> Windows. >>>>> >>>>> Windows is fine with forward slashes in paths. I suspect the "%1" expansion. >>>> >>>> But since using "/" as a path element seprator in a command line >>>> will cause trouble, people tend to avoid using them as such. >>> >>> That is interesting to me. What trouble? >>> >>> I have used forward slashes as path element separators in Windows >>> command-line commands. I don't recall that it caused any trouble. >> >> I checked with Windows XP just before posting. The CLI did not >> like >> dir /download >> and no wonder since "/" is used in many command-line programs for >> indicating parameters. Windows 7 behaves the same way. (I just >> checked.) >> >> It is easier to just use backslashes and not have to worry if >> slash is acceptable in the current context. I prefer just typing and >> not having to think about typing. >> >>> I'm always learning from this forum. >> >> So do I. >> >> Sincerely, >> >> Gene Wirchenko > > Forward slash works That settles it, then. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-06-03 19:23 -0700 |
| Message-ID | <vv6os7t1jg388jk9imrjhhak9kbk036r71@4ax.com> |
| In reply to | #15005 |
On Sat, 02 Jun 2012 09:31:57 -0700, Lew <noone@lewscanon.com> wrote:
>bilsch wrote:
>> Gene Wirchenko wrote:
>>> Lew wrote:
[snip]
>>>> I have used forward slashes as path element separators in Windows
>>>> command-line commands. I don't recall that it caused any trouble.
>>>
>>> I checked with Windows XP just before posting. The CLI did not
>>> like
>>> dir /download
>>> and no wonder since "/" is used in many command-line programs for
>>> indicating parameters. Windows 7 behaves the same way. (I just
>>> checked.)
>>>
>>> It is easier to just use backslashes and not have to worry if
>>> slash is acceptable in the current context. I prefer just typing and
>>> not having to think about typing.
>>>
>>>> I'm always learning from this forum.
>>>
>>> So do I.
>> Forward slash works
>
>That settles it, then.
Hardly. I mentioned where I checked it, and it most definitely
did not work.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | bilsch <bilsch01@gmail.com> |
|---|---|
| Date | 2012-05-29 12:55 -0700 |
| Message-ID | <jq39j7$81l$2@dont-email.me> |
| In reply to | #14884 |
On 5/29/2012 7:06 AM, Lew wrote: > Nigel Wade wrote: >> Silvio Bierman wrote: >>> bilsch wrote: >>>> 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? >>>> >>>> TIA Bill S. >>> >>> Not really Java related but anyway: in DOS/Windows you need to quote the >>> complete path like "C:/My Documents/Pictures/abc.WMV" etc. >>> >> >> it's often very convenient to use tab expansion of paths (both in >> Windows cmd >> shell, and UNIX/Linux bash shell). This would have discovered the >> correct path >> for the OP. For example, enter in the cmd.exe: >> >> javac -d C:\Users\Owner\My >> >> then hit tab. Windows will do the rest, even adding appropriate quotes >> where >> necessary. Note that you must use the Windows \ path separator for >> this to work. > > "/" is a Windows path *element* separator. ";" is the path separator in > Windows. > > Windows is fine with forward slashes in paths. I suspect the "%1" > expansion. > I discovered that the directory is called simply 'Documents' in DOS instead of 'My Documents' as in Windows. So there's no need of quoting. The javac command produces a class file.
[toc] | [prev] | [next] | [standalone]
| From | Nigel Wade <nmw@ion.le.ac.uk> |
|---|---|
| Date | 2012-05-30 10:30 +0100 |
| Message-ID | <a2m7o1FaguU1@mid.individual.net> |
| In reply to | #14884 |
On 29/05/12 15:06, Lew wrote: > Nigel Wade wrote: >> >> it's often very convenient to use tab expansion of paths (both in >> Windows cmd >> shell, and UNIX/Linux bash shell). This would have discovered the >> correct path >> for the OP. For example, enter in the cmd.exe: >> >> javac -d C:\Users\Owner\My >> >> then hit tab. Windows will do the rest, even adding appropriate quotes >> where >> necessary. Note that you must use the Windows \ path separator for >> this to work. > > "/" is a Windows path *element* separator. ";" is the path separator in > Windows. > > Windows is fine with forward slashes in paths. > But not in tab-expansion, as I said. -- Nigel Wade
[toc] | [prev] | [next] | [standalone]
| From | bilsch <bilsch01@gmail.com> |
|---|---|
| Date | 2012-05-29 12:54 -0700 |
| Message-ID | <jq39gp$81l$1@dont-email.me> |
| In reply to | #14880 |
On 5/29/2012 5:58 AM, Nigel Wade wrote: > On 29/05/12 13:32, Silvio Bierman wrote: >> On 05/29/2012 02:16 PM, bilsch wrote: >>> 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? >>> >>> TIA Bill S. >> >> Not really Java related but anyway: in DOS/Windows you need to quote the >> complete path like "C:/My Documents/Pictures/abc.WMV" etc. >> > > it's often very convenient to use tab expansion of paths (both in > Windows cmd shell, and UNIX/Linux bash shell). This would have > discovered the correct path for the OP. For example, enter in the cmd.exe: > > javac -d C:\Users\Owner\My > > then hit tab. Windows will do the rest, even adding appropriate quotes > where necessary. Note that you must use the Windows \ path separator for > this to work. > Thanks for the info.
[toc] | [prev] | [next] | [standalone]
| From | bilsch <bilsch01@gmail.com> |
|---|---|
| Date | 2012-05-29 12:50 -0700 |
| Message-ID | <jq39aq$6hq$1@dont-email.me> |
| In reply to | #14879 |
On 5/29/2012 5:32 AM, Silvio Bierman wrote: > On 05/29/2012 02:16 PM, bilsch wrote: >> 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? >> >> TIA Bill S. > > Not really Java related but anyway: in DOS/Windows you need to quote the > complete path like "C:/My Documents/Pictures/abc.WMV" etc. > > Silvio > Thanks Silvio. I discovered that the directory is called simply 'Documents' in DOS instead of 'My Documents' as in Windows. So there's no need of quoting. The javac command produces a class file. Thanks Bill S.
[toc] | [prev] | [next] | [standalone]
| From | "Mike Schilling" <mscottschilling@hotmail.com> |
|---|---|
| Date | 2012-05-29 07:31 -0700 |
| Message-ID | <jq2mki$7cr$1@dont-email.me> |
| In reply to | #14877 |
"bilsch" <bilsch01@gmail.com> 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.
[toc] | [prev] | [next] | [standalone]
| From | bilsch <bilsch01@gmail.com> |
|---|---|
| Date | 2012-05-29 12:59 -0700 |
| Message-ID | <jq39qf$a3j$1@dont-email.me> |
| In reply to | #14885 |
On 5/29/2012 7:31 AM, Mike Schilling wrote: > "bilsch"<bilsch01@gmail.com> 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. > > I discovered that the directory is called simply 'Documents' in DOS instead of 'My Documents' as in Windows. So there's no need of quoting. I did try using the short DOS name for Documents, which is DOCUME~1, and that does work. The javac command produces a class file.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web