3 Replies Latest reply on Jan 19, 2011 6:36 AM by Don George

    Looping for each file in an unzipped zip file transfer



      I am working on a NSH script that currently copies 1 file over from a staging server to a web server where that ear file or xml file is then deployed/installed on it.  I have been asked to deploy numerous files in a single zip file.  I'm looking for the for the best way to loop through the directory where I unzip the files and install the ear/xml file.  Does anyone have examples of unzipping a zip file and doing something with each file that's unzipped?  Would this work?


      unzip -o  /tmp/don.zip -d /tmp/don

      for file in "ls /tmp/don"


           <run deploy commands here >



      I'll be working on this tonight so any suggestions/feedback would be most appreciated.  Ping me on Communicator as well if you see me around.