Student version:
(12) How to store and retrieve files
1. If you have a binary file,
be sure to request BINARY mode
after you start.----------------------PROBLEM:
SOLUTION:
2. You can begin by running--------------PROBLEM:
NFT, a program that SOLUTION:
automatically opens a
connection to storage.
3. The PUT command is one of
over a dozen that NFT offers.---------PROBLEM:
Store a file by typing SOLUTION:
put filename
4. Retrieve a stored file
by typing
get filename
unless you already have a-------------PROBLEM:
file by that name, in which SOLUTION:
case NFT will print the message
"cannot clobber existing file."
Then you have a choice of-------------PROBLEM:
typing SOLUTION:
clobber
to allow overwriting or
get filename newname
to change the name of the
retrieved file as it arrives.
5. End NFT
by typing quit
Annotated version:
(12) How to store and retrieve files
1. If you have a binary file,
be sure to request BINARY mode
after you start.----------------------PROBLEM: WRONG ORDER
SOLUTION: move after step 2
2. You can begin by running--------------PROBLEM: NO OVERT COMMAND
NFT, a program that SOLUTION: Run NFT, a program...
automatically opens a
connection to storage.
3. The PUT command is one of
over a dozen that NFT offers.---------PROBLEM: IRRELEVANT TEXT
Store a file by typing SOLUTION: delete extra words--
put filename Store a file...
4. Retrieve a stored file
by typing
get filename
unless you already have a-------------PROBLEM: TROUBLESHOOTING TIP
file by that name, in which SOLUTION: add a warning
case NFT will print the message (see next problem)
"cannot clobber existing file."
Then you have a choice of-------------PROBLEM: COMPLEX STEP
typing SOLUTION: subdivide in warning--
clobber WARNING--NFT automatically
to allow overwriting or prevents you from
get filename newname writing over a file
to change the name of the of the same name.
retrieved file as it arrives. Either
(a) authorize the over-
5. End NFT write by typing
by typing quit clobber or
(b) change the retrieved
file's name by
typing
get filename newname