| 1 |
ninoborges |
8 |
"""
|
| 2 |
|
|
SplitFirstChunk.py
|
| 3 |
|
|
|
| 4 |
|
|
Created by Emanuel Borges
|
| 5 |
|
|
12.18.2008
|
| 6 |
|
|
|
| 7 |
|
|
This program will let people read the first chunk of a file by opening that first chunk and saving it to a
|
| 8 |
|
|
separate txt file. Its useful when you have a HUGE dat file and you want to look at the fields and delim.
|
| 9 |
|
|
|
| 10 |
|
|
"""
|
| 11 |
|
|
|
| 12 |
|
|
test = open(r"\\ercdis20\DIS05\C_D\49700059\EMAIL001-V8\Email001.dat")
|
| 13 |
|
|
|
| 14 |
|
|
contents = test.read(20971520)
|
| 15 |
|
|
test.close()
|
| 16 |
|
|
outputFile = open(r"\\ercdis20\DIS05\C_D\49700059\EMAIL001-V8\dave.dat",'w')
|
| 17 |
|
|
outputFile.write(contents)
|
| 18 |
|
|
outputFile.close() |