Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4272488
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:35:04+00:00 2026-05-21T07:35:04+00:00

Right now i have a batch job I wrote that calls another file and

  • 0

Right now i have a batch job I wrote that calls another file and passes in the variables that executable needs to run (password and filename).

Ex:

> cd f:\test\utils 
> admin import-xml -Dimport.file=f:\DB\file1.xml  -Dadmin.db.password=test123

I wrote a job that does this, but found out that there would be multiple files.

The username and password never change but the filename differs for like 15 different xml files–with maybe more coming soon.

The files will always be located in the same folder. Instead of ending up with like 15-20 jobs (one for each file), can I write something that will process each file located in this directory. And either wait till one is completed before the next or I can add a 3 min sleep before it starts the next file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T07:35:05+00:00Added an answer on May 21, 2026 at 7:35 am
    pushd C:\test\utils
    for %%F in (F:\DB\*.xml) do (
       admin import-xml "-Dimport.file=%%~dpnxF" -Dadmin.db.password=test123
    )
    popd
    

    The %%~dpnxF expands to d‎rive, p‎ath, base‎n‎ame and e‎x‎tension of the current file.

    If you intend to set and use environment variables (%foo%) in that loop, read help set first before you get into trouble.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now we have a dll file that contains all the database calls and
I have a batch file that I need to run within my NSIS installer.
I need some help. Right now i have done a file search that will
Right now I have an SSIS package that runs every morning and gives me
Right now I have a JSP page that allows to sort some items, when
Right now I have a table called Campaigns that has many Hits, if I
Im breaking my head against the table right now. I have a flash batch
Right now I have a class A that inherits from class B , and
I right now have a problem that is rather confusing to me: I have
So right now I have a partial view that just has a list of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.