|
bah, more fun to write the code ytourself :p Save the following code to a text file with a .vbs extension. Modify the filenames to be appropriate. Message box pops up at the end when it is done parsing. Beware wordwrap. Dim MyFSO Dim tsInFile Dim tsOutFile Dim iCounter Dim iFileCount Const ForReading = 1, ForWriting = 2, ForAppending = 8 iCounter = 1 iFileCount = 1 Set MyFSO = CreateObject("Scripting.FileSystemObject") Set tsInFile = MyFSO.OpenTextFile("c:\access.log", ForReading) Set tsOutFile = MyFSO.OpenTextFile("c:\outfile" & iFileCount & ".csv", ForWriting, True) Do If iCounter = 60000 Then iCounter = 1 tsOutFile.Close iFileCount = iFileCount + 1 Set tsOutFile = MyFSO.OpenTextFile("c:\outfile" & iFileCount & ".csv", ForWriting, True) End If tsOutFile.WriteLine (tsInFile.ReadLine) iCounter = iCounter + 1 Loop Until tsInFile.AtEndOfStream tsInFile.Close tsOutFile.Close msgbox "done" Set tsOutFile = Nothing Set tsInFile = Nothing Set MyFSO = Nothing ----- Original Message ----- From: "Walden H. Leverich III" <WaldenL@xxxxxxxxxxxxxxx> To: "'PC Technical Discussion for iSeries Users'" <pctech@xxxxxxxxxxxx> Sent: Friday, August 22, 2003 11:25 AM Subject: RE: [PcTech] Quick Way to Delete Large amount data in Word > Get the windows port of the GNU split.exe (http://unxutils.sourceforge.net/ > <http://unxutils.sourceforge.net/> ) and on a command line type: > > split -l65000 <inputfile> <outputprefix> > > and you'll get a bunch of files named <outputprefix>aa, <outputprefix>ab, > <outputprefix>ac, etc. each with 65000 lines. > > -Walden > > > > ------------ > Walden H Leverich III > President > Tech Software > (516) 627-3800 x11 > (208) 692-3308 eFax > WaldenL@xxxxxxxxxxxxxxx > http://www.TechSoftInc.com <http://www.techsoftinc.com/> > > Quiquid latine dictum sit altum viditur. > (Whatever is said in Latin seems profound.) > > > -----Original Message----- > From: Mark Allen [mailto:mallen@xxxxxxxx] > Sent: Friday, August 22, 2003 10:55 AM > To: pctech@xxxxxxxxxxxx > Subject: [PcTech] Quick Way to Delete Large amount data in Word > > > I've got a HUGE CSV file (too many rows to open in Excel) that I need to > break up into Excel-able (hey I invented a new word!!) sizes. > > My thoughts were to open it in Word, select a chunk of data, copy/paste it > into another doc and save. > > Problem is even using the fast scroll trick while selecting it is taking > FOREVER to select the chunk. Is there a quicker way? > > Mark Allen > IS Manager > Wilkes Telephone & Electric > 11 W. Court Street > Washington, GA 30673 > Phone: (706) 678-9565 > Fax: (706) 678-1000 > > > ---------------------------------------------------------------------------- ---- > _______________________________________________ > This is the PC Technical Discussion for iSeries Users (PcTech) mailing list > To post a message email: PcTech@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/pctech > or email: PcTech-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/pctech. >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.