[net.micro.cpm] multiple FTP gets from SIMTEL20 for CPM stuff..

LIN%mit-mc@sri-unix.UUCP (01/27/84)

From:  Herb Lin <LIN@mit-mc>

    From: STEVEH @ MIT-MC

    Is there any method that can be used, while FTPing, that allows
    one to not have to keep repeating MICRO:<CPM.xxxx> every time
    that you GET a file or get a DIRectory listing?

The way I automate this process is the following:

1. give FTP the SCRIPT command; this files away the terminal output
into a file of your choosing.  Call this file FOO.

2. do DIR MICRO:<CPM.xxxx>; this produces a directory listing in FOO.

3. edit FOO using the keyboard macro facility in EMACS to give the
appropriate lines.  Example:

FOO initially contains this:

dir micro:<CPM.filutl>   <- this is the command I issued
List started.		 <- this is what FTP tells me.
micro:<CPM.filutl>	 <- this is the name of the directory I asked about
compare.asm.20		 <- this is a file name in the directory.
sortv.asm.3		 <- this is a second file in the directory.

edit this file to look like this:

get mc:users2;COMP ASM	 <- get is the FTP command for getting a local
			    file.  MC:USERS2;COMP ASM is the file name
			    for the file you want to get.

micro:<cpm.filutl>compare.asm.20  <- COMPARE.ASM is the file name you
					want to get.

get mc:users2;SORT ASM		<- this is the local file name.

micro:<cpm.filtul>sortv.asm.3	<- SORTV.ASM is the second file you
					want.

The EMACS keyboard macro can be used to place the directory in front
of every desired file, and also to build the local file name from the
desired file name.  For example, on MC you can take the first six
characters of the first filename on SIMTEL and the last three
characters of the file type on SIMTEL.

Save the resulting file as BAR (For example)

4. LAST STEP.  issue to FTP the XFILE command.  This command takes a
command file and executes the contents just as though they were typed
in at the keyboard.

lemme know if I can help more.


Now, if only some version of MODEM would allow taking of files
received from a mainframe to a micro froma from a command file...

BILLW%sri-kl@sri-unix.UUCP (01/27/84)

Well, there is a set default directory command specified in the FTP
protocol, but it doesnt seem to work on many tops20 sites.

The name of the command also depends on your user FTP program.  The
CMU FTP uses CPATH, as in CPATH MICRO:<CPM.APPLE>  If your FTP does
not support an equivilent command, you can probably use a quote-like
command.  If simtel were up, Id test this out.  Oh well.

By the way, MODEM20 has had wildcard file transfers added to it,
and they almost work.  An option to take a list of files from
an indirect file would be easy to add.  Ill look into it.

BillW

fsbrn%brl-voc@sri-unix.UUCP (01/27/84)

From:      "Ferd Brundick (LTTB)" <fsbrn@brl-voc>

Haaah,

Our local implementation of ftp doesn't have the 'script' or 'xfile'
commands, so we have to use re-directed input.  I grabbed all the
cpmug catalog files (1 per directory) by building a file containing
the following commands:
    verbose
    tenex
    get "micro:<cpmug.vol001>catalog" catalog.001
    get "micro:<cpmug.vol002>catalog" catalog.002
    ...  (more of the same)
    bye

I actually built this file with a shell script that used the 'while' construct:
    i=1
    while test $i -lt 10
    do
        echo "get \"micro:<cpmug.vol00$i>catalog\" catalog.00$i" >>ftp.commands
        i=`expr $i + 1`
    done
(The sequence \" protects the double-quote)

Once you have built the ftp command file, you enter the following command:
    ftp simtel20 <ftp.commands
If you are transferring a large number of files, you may want to run the job
in the background by putting a '&' after the command line:
    ftp simtel20 <ftp.commands &

If the files require post-processing to remove the ITS header or convert CR/LF
to LF (for UN*X compatibility) put the ftp line in a second shell script:
    ftp simtel20 <ftp.commands
    for i in list_of_files
    do
        behead $i temp
        del.cr temp $i.fixed
    done

While this method requires a lot of work initially, it is much easier than
manually typing lots of 'get' commands.  The super-ftp file transfer program
that Dave Towson mentioned will (someday) be an interactive C version of the
method outlined above (but not this weekend -- I'm patching WordStar).

If you have any questions, problems, or suggestions, feel free to write to
me:  <fsbrn@brl-voc>

By the way, an easy way to transfer a small number of files is to put part
of the name in a Special Function key (I do this on an hp terminal):
    get "micro:<cpmug.vol
which saves some of the typing (and I don't forget what I'm supposed to use).

                                        dsw, fferd
                                        Fred S. Brundick
                                        USABRL, APG, MD.
                                        <fsbrn@brl-voc>