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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:55:12+00:00 2026-06-06T09:55:12+00:00

I was wondering if this was possible? I’m not familiar with using windows command

  • 0

I was wondering if this was possible? I’m not familiar with using windows command line, but I have to use it for a project I’m working on. I have a a number of files, for which I need to perform a function for each. I’m used to working with python, but obviously this is a bit different, so I was hoping for some help.

Basically I need the for loop to iterate through 17 files in a folder, perform a function on each (that’s using the specific software I have here for the project) and then that will output a file with a unique name (the function normally requires me to state the output file name) I would suck it up and just do it by hand for each of the 17, but basically it’s creating a database of a file, and then comparing it to each of the 17. It needs to be iterated through several hundred times though. Using a for loop could save me days of work.

Suggestions?

  • 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-06T09:55:15+00:00Added an answer on June 6, 2026 at 9:55 am

    The commandline interpreter does indeed have a FOR construct that you can use from the command prompt or from within a batch file.

    For your purpose, you probably want something like:

    FOR %i IN (*.ext) DO my-function %i
    

    Which will result in the name of each file with extension *.ext in the current directory being passed to my-function (which could, for example, be another .bat file).

    The (*.ext) part is the “filespec”, and is pretty flexible with how you specify sets of files. For example, you could do:

    FOR %i IN (C:\Some\Other\Dir\*.ext) DO my-function %i
    

    To perform an operation in a different directory.

    There are scores of options for the filespec and FOR in general. See

    HELP FOR
    

    from the command prompt for more information.

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

Sidebar

Related Questions

I was just wondering if this is possible using TortoiseSVN: I have a file
I am wondering if this is possible or not(if not any suggestions). I have
I was wondering if this was possible... I have a sequence of variables that
I'm just wondering if this is possible, and if not, the best way to
I am wondering if it's possible to achieve this using the jQuery UI Slider.
I was just wondering if this is possible. I have a site that admins
Am just wondering is this possible to use FPTwebRequest to call a file share.
I am wondering if this is possible. I have a List Table (lstTable) that
I'm wondering if this is possible in SQL. Say you have two tables A
I was wondering if this were possible. I have a very complicated script, that

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.