Splitting .TXT files

G

GKW in GA

I have a large text file that I would like to split into multiple smaller
text files of approximatley the same size. It is too large for Excel. How can
I do this aside from copy and paste in NOTEPAD
 
K

Ken Blake, MVP

I have a large text file that I would like to split into multiple smaller
text files of approximatley the same size. It is too large for Excel. How can
I do this aside from copy and paste in NOTEPAD



I'm not sure why you would even want to consider using Excel for this
purpose, but what do you have against Copy and Paste (whether in
Notepad or a word processor)? It certainly seems like the simplest and
easiest way to me.
 
G

GKW in GA

I may be mistaken but it appears that after you split the files you have to
use the tool to join them back together before you can work with them.

I was hoping to be able to split a large .txt file that someone sent me into
smaller .txt files and then email them back (one at at a time) so they could
open them with notepad without them having to install file splitter and join
them back together. Will this still work?
 
G

GKW in GA

I mentioned in my original post that it was too large for Excel so I was not
considering Excel.

I guess I could cut and paste but I was hoping to make them all about the
same size. I was going to email the file to the requestor, so due to the
limit on attachment size, if the original file was very large, I might have
to create mutiple smaller files which could be time consuming to do manually.
Therefore, I was hoping to automate it a bit.
 
I

Industrial One

I mentioned in my original post that it was too large for Excel so I was not
considering Excel.

I guess I could cut and paste but I was hoping to make them all about the
same size. I was going to email the file to the requestor, so due to the
limit on attachment size, if the original file was very large, I might have
to create mutiple smaller files which could be time consuming to do manually.
Therefore, I was hoping to automate it a bit.

Ken Blake said:
On Thu, 10 Jul 2008 08:24:01 -0700, GKW in GA
I'm not sure why you would even want to consider using Excel for this
purpose, but what do you have against Copy and Paste (whether in
Notepad or a word processor)? It certainly seems like the simplest and
easiest way to me.

Which is why you should use a hex editor. It displays the offset as
you scroll, so you know exactly where half of the file would be, or
1/4, 1/10 whatever. You can split it by hand (copy/paste) or automate
it. Your recipients should have and know how to use a hex editor. It's
a very basic tool.
 
P

Pegasus \(MVP\)

Industrial One said:
I mentioned in my original post that it was too large for Excel so I was
not
considering Excel.

I guess I could cut and paste but I was hoping to make them all about the
same size. I was going to email the file to the requestor, so due to the
limit on attachment size, if the original file was very large, I might
have
to create mutiple smaller files which could be time consuming to do
manually.
Therefore, I was hoping to automate it a bit.

Ken Blake said:
@discussions.microsoft.com> wrote:
I have a large text file that I would like to split into multiple
smaller
text files of approximatley the same size. It is too large for Excel.
How can
I do this aside from copy and paste in NOTEPAD
I'm not sure why you would even want to consider using Excel for this
purpose, but what do you have against Copy and Paste (whether in
Notepad or a word processor)? It certainly seems like the simplest and
easiest way to me.

Which is why you should use a hex editor. It displays the offset as
you scroll, so you know exactly where half of the file would be, or
1/4, 1/10 whatever. You can split it by hand (copy/paste) or automate
it. Your recipients should have and know how to use a hex editor. It's
a very basic tool.

A hex editor would not appear to be the ideal tool for a file splitter
if a job is to be automated. I would go for a splitter that can be
invoked in a batch file, one that creates file fragments that can
be reassembled by the humble "copy" command.

To the OP: If you can't locate a suitable splitter within a day or two
then I'll let you have my VB Script-based splitter. It will run on any
Windows OS without installation and it meets all of the above
requirements.
 
B

Big_Al

GKW said:
I have a large text file that I would like to split into multiple smaller
text files of approximatley the same size. It is too large for Excel. How can
I do this aside from copy and paste in NOTEPAD

I have a unix set of utilities that we use for development at the office.
Split.exe in unix takes a command line argument of a file name, and a
line count, and a base output file. I have not used it in a while and
the order of arguments etc may be wrong, but the point is: ie.

split.exe Largefile.txt 400 output
and it will makes output files of 400 lines of text starting with
outputaa
outputab
outputac
.....
outputaz
outputba
outputbb
outputbc
....
outputbz
outputca
etc.

If you can find a copy of this utility it will maintain the text file
but just break it into pieces.
And a simply copy outputaa+outputab+outputac .... will put them together.

Disclaimer: I don't know your file or cr/lf necessity etc and how
split.exe (whatever version you get) will handle them. So there are
some variables still in this process.
 
B

Big_Al

Big_Al said:
I have a unix set of utilities that we use for development at the office.
Split.exe in unix takes a command line argument of a file name, and a
line count, and a base output file. I have not used it in a while and
the order of arguments etc may be wrong, but the point is: ie.

split.exe Largefile.txt 400 output
and it will makes output files of 400 lines of text starting with
outputaa
outputab
outputac
....
outputaz
outputba
outputbb
outputbc
...
outputbz
outputca
etc.

If you can find a copy of this utility it will maintain the text file
but just break it into pieces.
And a simply copy outputaa+outputab+outputac .... will put them together.

Disclaimer: I don't know your file or cr/lf necessity etc and how
split.exe (whatever version you get) will handle them. So there are
some variables still in this process.
I found this tools.zip
I was able to take the less.man file and split it into 20 lines per file.
SPLIT -l=20 LESS.MAN OUTPUT
and this created files ouputaa outputab outputac etc. All 20 lines.

http://msteed.org/software/unix_on_nt/

See if this is what you want. Remember its for text files. And as
others have commented, somehow you are talking about excel which is
confusing us.
 
M

metspitzer

I may be mistaken but it appears that after you split the files you have to
use the tool to join them back together before you can work with them.

I was hoping to be able to split a large .txt file that someone sent me into
smaller .txt files and then email them back (one at at a time) so they could
open them with notepad without them having to install file splitter and join
them back together. Will this still work?

Use a program called HJsplit
It is free
 
H

HeyBub

GKW said:
I mentioned in my original post that it was too large for Excel so I
was not considering Excel.

I guess I could cut and paste but I was hoping to make them all about
the same size. I was going to email the file to the requestor, so due
to the limit on attachment size, if the original file was very large,
I might have to create mutiple smaller files which could be time
consuming to do manually. Therefore, I was hoping to automate it a
bit.

ZIP the file. If the file's a text file, it'll end up about 10% of the
original.
 
M

metspitzer

I mentioned in my original post that it was too large for Excel so I was not
considering Excel.

I guess I could cut and paste but I was hoping to make them all about the
same size. I was going to email the file to the requestor, so due to the
limit on attachment size, if the original file was very large, I might have
to create mutiple smaller files which could be time consuming to do manually.
Therefore, I was hoping to automate it a bit.

If the file size is the only factor you should use Winrar. It will
squish the file small enough to send in one whack.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top