Expect script Execution Problems .. Help!!!

Hi Guys,

I am writing the expect script which take input from the txt file and check whether that file is present over the Sftp or not.If yes then delete other wise check the next one.. I am able to do comparison online for single file...

Please also note still i didn't try to implement delete part.

Please check given below code and provide me the suggestion.

Error in this code:Can't do comparison for multiple files.

The reason you need to use a third-party brute-force hacking tool to inject plaintext passwords into sftp is because it's designed to prevent you from doing this for security reasons. It's a subtle hint, written in mile-high flashing neon letters, that it is a really bad idea.

If you use ssh keys the way they're designed to work, your program becomes much simpler and doesn't need expect at all.