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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:31:56+00:00 2026-05-31T05:31:56+00:00

When running long command in .bat file (say 300 characters length) for example: Some_exe

  • 0

When running long command in .bat file (say 300 characters length)

for example:

Some_exe "C:/Documents and Settings/Some user/Some folder1/Some folder2/Some folder3/Some folder4 ... -Some_exe_arg1="arg 1 name" -Some_exe_arg2="arg 2 name" -Some_exe_arg3="arg 3 name"  

Is there a limit on the line size CMD.exe can process?
Should i use .CMD or .BAT?
Is there any way i can overcome this limitation?

Thank you!

  • 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-31T05:31:57+00:00Added an answer on May 31, 2026 at 5:31 am

    The minimum of the maximum batch line length is 8191 bytes!

    This means that a line can be in any case 8191 bytes long, but it is also possible to create legal batch lines with nearly unlimited length.

    Samples

    echo Longline with 8191 characters.........
    
    set "var=a"
    echo UltraLongLine %var:4000chars=% %var:4000chars=% %var:4000chars=% %var:4000chars=%
    
    echo Test <8000Chars <8000chars <8000chars .... <nul
    

    The point is here, that all lines are less than 8192 bytes long after parsing

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

Sidebar

Related Questions

I have a powershell command running when I execute a bat file, The command
In a Forms application I'm displaying log output from a long running command-line application
Suppose a long-running process writes to a log file. Suppose that log file is
I'd like to prevent multiple instances of the same long-running python command-line script from
Hi I've got an app that runs a long running process on the command
If I am running a long R script from the command line ( R
I've been using the built-in OSX 'say' command to signal the end of long
I'm designing a long running process, triggered by a Django management command, that needs
i have a django project with a long running (~3hour) management command in my
I want to execute a long running command in Bash, and both capture its

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.