[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Not entirely OT: quotation marks with cmd commands



I ALWAYS keep my computer and printer names down to 8 letters, for ease of referencing from the DOS prompt. But I'm helping someone with a networked PC and printer with long, full of spaces, UNC names. How do you set them off in typed command or a bat file? I could have sworn Harry said something about that not too long ago, but cannot find it.

Yes:
>>if your computer name has a space in it, try enclosing it in quotes, as in:
net use lpt2 "\\This Computer" /Persistent:Yes<<
For example, if I need to say
net use lpt1 \\Too Long PC Name\Too Long Printer Share
Where do I put the quotes? Around everything after "use"? Or just before the first \\ and at the end?

Before the first \\.



Harry Binswanger
hb@xxxxxxxx