• 1 reply
  • Latest Post - ‏2005-03-03T20:59:47Z by SystemAdmin
232 Posts

Pinned topic ftp expect script

‏2005-02-10T18:27:14Z |
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
    232 Posts

    Re: ftp expect script

    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.