Loop a shell command (batch file)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eric1025@gmail.com

    #1

    Loop a shell command (batch file)

    I have a form with a command button. When the command button is
    clicked, it runs a batch file via the Shell command. The batch file is
    run with a few variables coming from the database such as %1 and %2 for
    different fields, so that a user is added to a group in active
    directory, and then one of my access database fields (Date_Added) is
    set to Me!Date_Added = Date.

    I would like to make this more of a batch type process, where the file
    is run against a query instead of pushing the button on each record. I
    dont know where to start with this.

    I have a query with the database field (the user ID) and I get back 25
    records I want to run the batch file against. How do I loop these and
    update my "Date_Added " field on each one?

    Thanks for your help,
    Eric

  • Br@dley

    #2
    Re: Loop a shell command (batch file)

    eric1025@gmail. com wrote:[color=blue]
    > I have a form with a command button. When the command button is
    > clicked, it runs a batch file via the Shell command. The batch file is
    > run with a few variables coming from the database such as %1 and %2
    > for different fields, so that a user is added to a group in active
    > directory, and then one of my access database fields (Date_Added) is
    > set to Me!Date_Added = Date.
    >
    > I would like to make this more of a batch type process, where the file
    > is run against a query instead of pushing the button on each record.
    > I dont know where to start with this.
    >
    > I have a query with the database field (the user ID) and I get back 25
    > records I want to run the batch file against. How do I loop these and
    > update my "Date_Added " field on each one?
    >
    > Thanks for your help,
    > Eric[/color]

    Maybe communicate directly with AD instead?
    (I only use SQL Server T-SQL to modify SQL accounts or giving existing
    Windows accounts access to SQL Server).
    --
    regards,

    Br@dley


    Comment

    • eric1025@gmail.com

      #3
      Re: Loop a shell command (batch file)

      Do you have any examples on how to do that?

      Comment

      Working...