in reply to net:appliance::session copy tftp bootflash:

Consider sending a command that includes all of the requested information already, so it doesn't prompt you for the missing info:
copy tftp://10.148.48.52/cat4500-ipbasek9-mz.122-31.SGA9.bin bootflash +:cat4500-ipbasek9-mz.122-31.SGA9.bin

Replies are listed 'Best First'.
Re^2: net:appliance::session copy tftp bootflash:
by boatperl (Initiate) on Sep 19, 2009 at 14:56 UTC

    Thank you markkawika, so simple it was brilliant. When you do this on console it still prompts for Destination filename. So I didn't think it would work. But using the below in the script works everytime:

    my $copy = ("copy tftp://10.148.48.52/cat4500-ipbasek9-mz.122-31.SGA +9.bin bootflash:cat4500-ipbasek9-mz.122-31.SGA9.bin"); $session_obj->input_log(*STDOUT); $session_obj->begin_privileged($userinfo[1]); $session_obj->cmd("$copy"); $session_obj->cmd("cat4500-ipbasek9-mz.122-31.SGA9.bin"); $session_obj->close;
    Thank you