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

  • Home
  • SEARCH
  • 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 306493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:28:19+00:00 2026-05-12T07:28:19+00:00

I am generating a Windows batch file that might become quite large, say a

  • 0

I am generating a Windows batch file that might become quite large, say a few megabytes. I’ve searched for possible limits regarding the maximum file size and maximum length of a line in a batch file, but I couldn’t find anything. Any practical experiences?

  • 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-12T07:28:20+00:00Added an answer on May 12, 2026 at 7:28 am

    I think filesize can be anything up to 2 GB, perhaps even more. It’s an interpreted language, so if this is done right, filesize limit should be the filesize limit of the file system. I never had any errors with batch files being too large, and some of those I created were several MBs in size.

    There should be a line length limit, but it should be more than 256. This can easily be tested, just do some “set A=123456789012…endofline”, after that “echo %A%”, and you’ll see how far you can go.

    It works for me with very long lines (around 4K), but at 8K echo gives a message, “Line too long”, so 8192 bytes should be some limit.

    Now tested for filesize, too, tested with “echo off”, thousands of set lines, after that “echo end”, and it worked for a 11 MB file (although it took some seconds to finish 🙂 – no limit in sight here.

    110 MB worked, too. Is this enough? 😉

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

Sidebar

Related Questions

I'm having trouble generating a timestamp in a Windows batch file, because I get
I'm generating some xml files that needs to conform to an xsd file that
In our application, we are generating some large ASCII log files to an Windows
I'm dynamically generating a Windows Forms form by reading an XML file. (Actually I
I'm generating a ton of XML that is to be passed to an API
I would like to have a non-modal alert box called form a batch file.
In generating Windows DLL dynamic libraries, you are asked to declare which functions should
I have developed an app that runs as a windows service and regularly does
I have a Java application that is generating JasperReports. It will create as many
I'm generating and showing a new WinForms window on top of a Main Window.

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.