splitting files

  • Thread starter Thread starter Québec
  • Start date Start date
Québec said:
Is this possible with cmd?
Depending on the type of files and how you want to split: maybe.

Please give some more details. There are a lot of splitters/chunkers
out there as 3rd party cmd line tools if this is an option.
 
Please give some more details. There are a lot of splitters/chunkers
out there as 3rd party cmd line tools if this is an option.
yes. I find them cumbersome.


I have an error.log (10 Mo text file) that I want to split in namenumber1
namenumber2 etc files of lets say 1Mo size
 
Hello, Québec:
On Mon, 10 Jan 2005 16:19:06 -0500: you wrote...

Q>
??>> Please give some more details. There are a lot of splitters/chunkers
??>> out there as 3rd party cmd line tools if this is an option.
Q> yes. I find them cumbersome.
Q>
Q> I have an error.log (10 Mo text file) that I want to split in
Q> namenumber1 namenumber2 etc files of lets say 1Mo size
Q>

Cumbersome? I guess you won't like this then but LogParser available free
from the Microsoft website is perfect for dealing with such problems using
SQL-like queries. It runs from the command prompt or can be scripted as a
COM object.

Little example to show how it works even with vague text formats:
logparser -i:TEXTWORD "select Avg(TO_REAL(Text)) from c:\logs\Speed.log
where Text like '%%Kbytes/sec.U'" -q

Regards, Paul R. Sadowski [MVP].
 
Paul said:
Cumbersome? I guess you won't like this then but LogParser available free
from the Microsoft website is perfect for dealing with such problems using
SQL-like queries. It runs from the command prompt or can be scripted as a
COM object.

Little example to show how it works even with vague text formats:
logparser -i:TEXTWORD "select Avg(TO_REAL(Text)) from c:\logs\Speed.log
where Text like '%%Kbytes/sec.U'" -q
I aggree with Paul, even the eventlog is an input option.

http://www.logparser.com is "The Unofficial Log Parser Support Site"
 
I don't think so
I use GFSplit (very good)
GFSPlit also creates a BAT do re-join files
 
I created a Java application.

And
I tried it. Does not sem to be the right way. ..
Following is my batch file and the command line.

; GSplit Batch File
;"C:\Program Files\GSplit\GSplit.exe" "no" -b-i-t "C:\Program
Files\EasyPHP1-7\apache\logs\mybatch.txt"
[Main]
ConfigFile="C:\Program Files\GSplit\default.gsf"
Source="C:\Program Files\EasyPHP1-7\apache\logs\errorbis.log"
DestFolder="C:\Program Files\EasyPHP1-7\apache\logs"
PieSizes=1000
PieSizesUnit=Bytes
TypePieSpanned=0
Title=mySplitted

===============
 
Jean Pierre Daviau said:
I created a Java application.

And
I tried it. Does not sem to be the right way. ..
Following is my batch file and the command line.

I don't see anything that looks like a batch file here.

/Al
; GSplit Batch File
;"C:\Program Files\GSplit\GSplit.exe" "no" -b-i-t "C:\Program
Files\EasyPHP1-7\apache\logs\mybatch.txt"
[Main]
ConfigFile="C:\Program Files\GSplit\default.gsf"
Source="C:\Program Files\EasyPHP1-7\apache\logs\errorbis.log"
DestFolder="C:\Program Files\EasyPHP1-7\apache\logs"
PieSizes=1000
PieSizesUnit=Bytes
TypePieSpanned=0
Title=mySplitted

===============
"KayZer Soze" <[email protected]> a écrit dans le message de news:
O0j5g1j%[email protected]...
I don't think so
I use GFSplit (very good)
GFSPlit also creates a BAT do re-join files
 
I think that's the way they call their file.
; GSplit Batch File


Al Dunbar said:
Jean Pierre Daviau said:
I created a Java application.

And
I tried it. Does not sem to be the right way. ..
Following is my batch file and the command line.

I don't see anything that looks like a batch file here.

/Al
; GSplit Batch File
;"C:\Program Files\GSplit\GSplit.exe" "no" -b-i-t "C:\Program
Files\EasyPHP1-7\apache\logs\mybatch.txt"
[Main]
ConfigFile="C:\Program Files\GSplit\default.gsf"
Source="C:\Program Files\EasyPHP1-7\apache\logs\errorbis.log"
DestFolder="C:\Program Files\EasyPHP1-7\apache\logs"
PieSizes=1000
PieSizesUnit=Bytes
TypePieSpanned=0
Title=mySplitted

===============
"KayZer Soze" <[email protected]> a écrit dans le message de news:
O0j5g1j%[email protected]...
I don't think so
I use GFSplit (very good)
GFSPlit also creates a BAT do re-join files

Is this possible with cmd?
 
Jean Pierre Daviau said:
I think that's the way they call their file.
; GSplit Batch File

Could be, but if they call their batch file that way, then its name is
either gsplit.cmd or gsplit.bat, and the parameters it will receive will be
"Batch" and "File".

More likely this was intended to be a comment saying "this is the content of
the gsplit batch file", but they should have used REM or ::: to flag it as a
comment

The second (line-wrapped) command seems to be the one contained in the batch
file and used to invoke the gsplit.exe program:

If the batch file itself is called gsplit.bat or gsplit.cmd, then the first
line "; gsplit batch file" will, in essence, become an infinite loop,
calling and re-calling it until the stack overflows.

That is probably why it is not choking on the rest of the file, which
appears more to be in .ini than batch format. Perhaps the OP is assuming
that an executable reads its .ini file from the lines in the batch file
following the one that invoked the program. Some o/s's work this way, but
not Windows.

/Al
"Al Dunbar [MS-MVP]" <[email protected]> a écrit dans le message
de news: eZlvcM$%[email protected]...
Jean Pierre Daviau said:
I created a Java application.

And
I tried it. Does not sem to be the right way. ..
Following is my batch file and the command line.

I don't see anything that looks like a batch file here.

/Al
; GSplit Batch File
;"C:\Program Files\GSplit\GSplit.exe" "no" -b-i-t "C:\Program
Files\EasyPHP1-7\apache\logs\mybatch.txt"
[Main]
ConfigFile="C:\Program Files\GSplit\default.gsf"
Source="C:\Program Files\EasyPHP1-7\apache\logs\errorbis.log"
DestFolder="C:\Program Files\EasyPHP1-7\apache\logs"
PieSizes=1000
PieSizesUnit=Bytes
TypePieSpanned=0
Title=mySplitted

===============
"KayZer Soze" <[email protected]> a écrit dans le message de O0j5g1j%[email protected]...
I don't think so
I use GFSplit (very good)
GFSPlit also creates a BAT do re-join files

Is this possible with cmd?
 
Back
Top