How to Divide a text file in multiple files

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Niraj
Posts: 2
Joined: 19 Jul 2013 01:26

How to Divide a text file in multiple files

#1 Post by Niraj » 05 Nov 2013 01:04

Hi,
Want to divide a text file in to multiple files through batch script.

Example:

Input file : Big_file_name_1.txt

Output file : Small_file_name_1.txt
Small_file_name_2.txt

Regards,
Niraj

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: How to Divide a text file in multiple files

#2 Post by foxidrive » 05 Nov 2013 02:36

More information is needed.

What size is the big file?
What is the splitting keyed on - number of lines?
What filename scheme do you want?
Are there blank lines in the file? Do you need to preserve blank lines?
Does every line start with an alpha-numeric character?

Post Reply