Announcement

Collapse
No announcement yet.

Same shell action against multiple files?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Same shell action against multiple files?

    I'm considering using Setup Factory to release our Oracle code. These files need to be installed in the database using the sqlplus utility.

    I would like the ability to say 'run sqlplus against each of the files in this directory' rather than create a shell operation for each file (I'm lazy and will probably forget a file!).

    Is this possible?

    Andy

    ------------------
    Andy

  • #2
    Re: Same shell action against multiple files?

    How about installing a small batch file doing that with the FOR command?

    Comment


    • #3
      Re: Same shell action against multiple files?

      Yep, Andy, it's possible:

      1. Use a Search for File action to build a delimited list of the files in that directory (storing it in %OracleFiles%, say).

      2. Set up a WHILE loop to run sqlplus against each of the files listed in that %OracleFiles% variable.

      Probably something like this pseudo-code:

      Search for File
      Assign Value(%index% = 0)
      Get Delimited String(%filename%=string %index%...)
      WHILE(%filename% != "")
        Execute Program(run sqlplus on %filename%)
        Assign Value(%index%=%index + 1)
        Get Delimited String(%filename%=string %index% ...)
      END WHILE

      (That isn't a literal example, but it should give you a pretty good idea of the necessary actions.)
      --[[ Indigo Rose Software Developer ]]

      Comment


      • #4
        Re: Same shell action against multiple files?

        Originally posted by Lorne:
        Yep, Andy, it's possible:

        1. Use a Search for File action to build a delimited list of the files in that directory (storing it in %OracleFiles%, say).

        2. Set up a WHILE loop to run sqlplus against each of the files listed in that %OracleFiles% variable.

        Probably something like this pseudo-code:

        Search for File
        Assign Value(%index% = 0)
        Get Delimited String(%filename%=string %index%...)
        WHILE(%filename% != "")
          Execute Program(run sqlplus on %filename%)
          Assign Value(%index%=%index + 1)
          Get Delimited String(%filename%=string %index% ...)
        END WHILE

        (That isn't a literal example, but it should give you a pretty good idea of the necessary actions.)
        Presumably this is SF6 - I've currently got a SF5 demo from a magazine and this doesn't seem to include a programming language.


        ------------------
        Andy

        Comment


        • #5
          Re: Same shell action against multiple files?

          Hi Andy,

          Yes this is Setup Factory 6.0. You can download a Setup Factory 6.0 demo from: http://www.indigorose.com/files.html

          mark.
          MSI Factory The Next Generation Intelligent Setup Builder

          Comment

          Working...
          X