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 9251627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:45:00+00:00 2026-06-18T10:45:00+00:00

I want to run an exe file on all files in a folder with

  • 0

I want to run an exe file on all files in a folder with 4 different options of operation. So each file produces 4 different outputs and I want all 4 outputs to have different names.
Kindly be detailed in your response as I am not good at scripting.
Regards!

OKay, here is example code I want to automate:

  exefile -p1 1 -p2 2 -i inputfile.etc -o inputfile_12.etc 
  exefile -p1 3 -p2 4 -i inputfile.etc -o inputfile_34.etc 
  exefile -p1 5 -p2 6 -i inputfile.etc -o inputfile_56.etc 
  exefile -p1 7 -p2 8 -i inputfile.etc -o inputfile_78.etc 

The script should fetch all the file names from the folder, do these operation, and save the output with a modified name of the file.

Thanks!

Hi again, I need to improve it a bit. It should read all the files (two different extensions) in the folder and match the file names for similarity but of different extensions. Each file has a very similar file but with the other extension. So, two matched file names should be available in two variables that can passed on to the subsequent operation commands. Thanks!

  • 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-06-18T10:45:01+00:00Added an answer on June 18, 2026 at 10:45 am
    setlocal enabledelayedexpansion
    set /a num=1
    for %%a in (C:\folder\*.*) do (
    exefile -p1 1 -p2 2 -i %%a -o %%~na!num!%%~xa
    set /a num+=1
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to run an .exe file in hidden mode using vc++ in VS2010.
Let's say I have a foo.exe file that I want to use it from
I have two .exe file and 3 windows batch files and i need to
Dear all I want to execute a EXE file in Java, but I was
I want to run a console application (eg app.exe) from a windows form load
I want to run an executable from a ruby rake script, say foo.exe I
I want to design a c# program which can run program a 3rd exe
I want run all script from the directory . Like , The directory contains
I have written php program and uploaded on server. I want run this program
Want to run javascript function from parent window in child window Example I have

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.