Pinned topic ftp expect script
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
I am trying to create a script to automate and ftp process. So I decided to use an expect script. The problem that I run into is I need to rename all of the files that I get to have a .bak extension on them, and so I have to use the rename command within ftp but I can just do a rename *.dat *.bak I have to some how loop through each file in the directory stucture. Has anyone got a idea as to how to do this.
Updated on 2005-03-03T20:59:47Z at 2005-03-03T20:59:47Z by SystemAdmin
SystemAdmin 110000D4XK232 Posts
Re: ftp expect script2005-03-03T20:59:47ZThis is the accepted answer. This is the accepted answer.I had a similar issue - I wanted to delete all files with the .gz extension. I had expect give the prompt command ( to turn off prompting ), and did an mdelete *.gz, but nothing would happen. I then tried using kermit to do the same thing and it worked perfect.