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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:29:09+00:00 2026-06-06T16:29:09+00:00

I have a cli application that doesn’t like the usage of wildcards. In this

  • 0

I have a cli application that doesn’t like the usage of wildcards. In this example the usage of *.dat. I just get an error that the file *.dat is not valid.

I have a folder with thousands of files that need to be processed by this tool. So doing it manually is a no go. I encountered quite a few application where I had this problem but this time it’s rather important. A general solution how to deal with those application would be very nice.

Can I maybe make a file list of all *.dat files and feed it to the application?
It’s not necessary that I use batch script but it seemed like the most simple solution so far.

  • 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-06T16:29:12+00:00Added an answer on June 6, 2026 at 4:29 pm

    You can use a for loop:

    for %%x in (*.dat) do mycommand "%%x"
    

    That would start the command once for each file. If you want to aggregate them you have to do a little more work:

    setlocal enabledelayedexpansion
    set Count=0
    set List=
    for %%x in (*.dat) do (
      set List=!List! "%%x"
      set /a Count+=1
      if !Count! GEQ 50 (
        mycommand !List!
        set List=
        set Count=0
      )
    )
    

    This would pass 50 files at a time to the command. You can tweak that number if desired. The problem is if you have thousands of files in the folder, then you cannot simply list them all in a single command line (because there is a maximum command line length limit), so you have to process them in chunks.

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

Sidebar

Related Questions

Let's assume I have some method that executes CLI application. For example: public string
I have an unmanaged c++ application that provides a custom _matherr handler. When this
I have a C# application that needs to call a PHP script, and get
This is a .NET application on Windows forms using C++/CLI. I have a JPEG
I have a C++/CLI project that wraps a native C++ application, which I use
I have a C++/CLI based install application which needs to close another app I've
I have a C++/CLI project that wraps around an unmanaged C compression library, and
I have an application (CLI) which includes the feature of editing account information. It
we have a C++ Win32 DLL that reads data from Excel. The application uses
I have a C++/CLI application which needs to format a partition (single drive letter

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.