need to read from 2 separate lists simultaneously within a for loop, so that line 1 from file 1 is used with line 1 from file 2, then line 2 from file 1 is used with line 2 from file 2 etc. through the incrementation. Current code causes each line to be used several times before stepping onto the next line. The intention is to extract defined file lengths of data from specific offset locations.
g = open("images\\truesignatures.log", "r") # reads header position file
header_lines = g.readlines()
h = open("images\\wpfilesize.log", "r") # reads in the list of file sizes for application in carve interation
carve_size = h.readlines()
for count,(header,carved) in enumerate(zip(header_lines,carve_size)):
out_block = f.read(int(carved))
outfile = open('wpdocs\\file%03d.wp'%count, 'wb')
Dim Adapter As New OleDbDataAdapter
Dim Command As New OleDbCommand
Dim xFrom As String = dtpFrom.Value.ToString.Substring(0, dtpFrom.Value.ToString.IndexOf(" "))
Dim xTo As String = dtpTo.Value.ToString.Substring(0, dtpTo.Value.ToString.IndexOf(" "))
sqlQuery = MainQuery ...