well, so far I've gotten expect to work with nfbtrans if I use strings with the "send" command" that are exactly what I want entered for the various choices and filenames. However, I'm still working at trying to get expect to pick up variables that I've set in my original script that I want to carry into expect's interaction. The program is actually going through the right steps, but the variables i and i1 in my original script have to be passed to expect in some way i haven't yet ascertained. Here's what I've done so far in case anybody else wants to take a crack at it. i'm still working on it, and I've written to se if I can get the "Exploring Expect" book from Oreilly. Remember I'm just beginning with scripting and expect and try not to scream in horror at whatever i've left out or haven't done completely yet. thanks. Cheryl # Original nfbt script leading to expect #!/bin/bash for i in *.brf; do echo item: $i i1=`basename $i .brf`.txt echo item two: $i1 # all of the above works. expect cmdfile; # This works if I use strings with actual filenames in them but doesn't work if I try to use the variables above. done # The loop works and no processes are left running, though I might eventually want to use the close command in expect. # expect cmdfile spawn nfbtrans send "3\r$i\r$i1\r1\r"