Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ampersand in file name or command line

3,093 views
Skip to first unread message

Paul Emmons

unread,
Aug 11, 2008, 6:45:51 PM8/11/08
to
The ampersand ('&') is apparently a special character. It is allowed
in file names but, like the space, it demands that any file name
containing it be enclosed in quotation marks.

So I wonder, what does it mean normally in Win XP command lines (or
batch file statements)? What can we accomplish by using this
character?

Paul Emmons

unread,
Aug 11, 2008, 6:56:23 PM8/11/08
to
On Mon, 11 Aug 2008 22:45:51 GMT, Paul Emmons <pem...@voicenet.com>
wrote:
Yikes, I should have looked at existing posts before asking this
question. There are a lot of questions already about use of the
ampersand.

Nevertheless, I'm a total newbie on the subject of '&' in WinXP batch
language. Any links to an introduction would be welcome. Thanks for
your patience.

billious

unread,
Aug 11, 2008, 8:26:58 PM8/11/08
to

"Paul Emmons" <pem...@voicenet.com> wrote in message
news:vog1a4tu4pdcfq9l2...@4ax.com...

evidently on usenet conventions, too :)

(top-posting for emails, end-posting for usenet)

"&" is used as a command-separator in NT+. Quoting the filename may be used
to escape this behaviour - or escape ampersand with a predecing caret (^)
character.

Which one you use can depend on the circumstances. Gets even more complex
where you have carets in filenames too...

Possibly browse Timo's FAQ - or plenty of previous posts...


foxidrive

unread,
Aug 12, 2008, 2:06:54 AM8/12/08
to
On Mon, 11 Aug 2008 22:45:51 GMT, Paul Emmons <pem...@voicenet.com> wrote:

<cough>assignment</cough> :-)

Create this batch file and run it to see what happens.

@echo off&echo pauseing...&pause&echo finished

0 new messages