Yes there's no problem with that many arguments. Depending on your expect version, you extract the values with one of these:
lassign $::argv \
src_file src_user src_pass src_host \
dest_file dest_user dest_pass dest_host
# or
foreach {src_file src_user src_pass src_host dest_file dest_user dest_pass dest_host} $::argv {break}
At some point, the user interface gets hard to manage though. You might want to look into using command line options to help keep things straight. Check out the cmdline
package from tcllib
. Then you can do:
expect my_x_script.exp \
-src_file file_src \
-src_user s_user \
-src_pass s_pass \
-src_host s_host \
-dest_file file_dest \
-dest_user d_user \
-dest_pass d_pass \
-dest_host d_host