EasyManua.ls Logo

Commodore PC - Redirecting Command Input and Output; How to Redirect Your Output; Appending output

Commodore PC
414 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
16
MS-DOS
User's
Reference
You
can
automatically
set
your
path
when
you
start
MS-DOS
by
including
the
path
command
in
a
file
called
autoexec,
bat.
Refer
to
Chapter
4,
"Batch
Processing,"
for
more
information
on
the
autoexec,
bat
file.
U
Redirecting
output
Redirecting
Command
Input
and
Output
Usually,
ms-dos
receives
input
from
the
keyboard
and
sends
its
output
to
the
screen.
You
can,
however,
redirect
this
flow
of
com
mand
input
and
output.
For
instance,
you
may
want
input
to
come
from
a
file
instead
of
from
the
keyboard,
and
you
may
want
out
put
from
a
command
to
go
to
a
file
or
lineprinter
instead
of
to
the
screen.
With
redirection
you
can
also
create
pipes
that
let
the
out
put
from
one
command
become
the
input
for
another
command.
How
to
Redirect
Your
Output
By
default,
most
commands
send
output
to
your
monitor.
If
you
want
to
change
this
and
send
the
output
to
a
file,
you
just
use
a
greater-than
sign
(>)
in
your
command.
For
example,
the
follow
ing
command
displays
on
the
screen
a
directory
listing
of
the
disk
in
the
default
drive:
dir
u
The
dir
command
can
send
this
output
to
a
file
named
contents
if
you
type
the
following:
dir
>
contents
KJ
Appending
output
If
the
contents
file
doesn't
exist,
ms-dos
creates
it
and
stores
your
directory
listing
there.
If
contents
does
exist,
MS
DOS
replaces
what
is
in
the
file
with
the
new
data.
If
you
want
to
append
your
directory
or
add
one
file
to
another
(instead
of
replacing
the
entire
file),
you
can
use
two
greater-than
signs
(>>)
to
tell
ms-dos
to
append
the
output
of the
command
(such
as
a
directory
listing)
to
the
end
of
a
specified
file.
For
example,
the
following
command
appends
your
directory
listing
to
an
existing
file
named
contents-.
dir
>>
contents
If
contents
doesn't
exist,
ms-dos
creates
it.
u
u

Related product manuals