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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:49:57+00:00 2026-05-23T09:49:57+00:00

I am having a batch script to copy only the lines with a specific

  • 0

I am having a batch script to copy only the lines with a specific string to another file. The lines will be longer sometimes. I am using

FindStr /I “string” file1 > file2

to do this operation. But in the resultant file, it is truncating the lines to 1024 characters. Is there any limitation in the dos programming that, the text file lines should be this much length only? If there is such limitation, then is there something we can set to override this behaviour.

Cheers, PK

  • 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-23T09:49:57+00:00Added an answer on May 23, 2026 at 9:49 am

    I don’t know if there’s a specific limitation to your findstr. For what it’s worth, the one I have under XP SP3 works fine up to at least 2000-character lines (a).

    If yours is deficient in some way. you may want to think about either downloading CygWin or the grep tool from GnuWin32 (search for grep in the package list) and using that instead. But as I say, based on my experience, it shouldn’t be.


    (a) I created a single-line file with 2000 characters (repeating sequence of 1234567890) and then:

    C:\Pax> \cygwin\bin\wc xyz.txt
       1    1 2002 xyz.txt
    
    C:\Pax> findstr /i "123" xyz.txt >xyz2.txt
    
    C:\Pax> \cygwin\bin\wc xyz2.txt
       1    1 2002 xyz2.txt
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having difficulty returning JUST folders (ignore files) using a windows batch file. Here's
Am having a batch file used to update certain files. However when i try
How do I invoke an EXE from a batch file without having the latter
I am having trouble in doing this. there is 1 batch file with this
I'm having a hard time passing a filename to my R script. The file
I'm trying to create a batch file which will loop around a list of
Hey, I'm having some problems writing a batch file where I need to specify
I've been having some troubles redirecting a batch file to a log file as
I'm trying to write a small batch script that will delete files old files
In the following (simplified example) batch file I am having difficulty correctly setting Y

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.