Jump to content

need Techinical help.


Recommended Posts

Code process.au3

CODE
$version = inputbox("C00 Sorter", "Need to specify a Dir where the rebuild.log is. Example: failed5070", "failed5070")

;_Rundos('del c:\wfx32\results.log')

Runcmd('find /n /i "error" C:\wfx32\'&$version&'\'&$Filetosearch&' >> c:\wfx32\results.log')

;$version & $Filetosearch

;Msgbox(0, "c00", $c00 & $version)

Func RunCmd( $command )

Runwait( @ComSpec & " /C " & $command, "", @SW_HIDE )

$file = FileOpen("C:\wfx32\results.log",0)

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")

Exit

endif

EndFunc

;msgbox(0,"Move c:\wfx32\"&$version&"\"&$c00 & " c:\wfx32\bad\" & $c00)

While 1

$line = FileReadLine($file,$num)

$num = $num + 1

if StringInStr($line, "Check C:") Then

$line = StringTrimright ($line,12)

$c00 = stringright ($line,12)

Msgbox(0, "c00", $c00)

;msgbox(0,"test",)

If Stringinstr($line, "Incomplete C00") then

FileWriteLine($file, "")

;Runcmd('mkdir')

runcmd("Move c:\wfx32\"&$version&"\"&$c00 & " c:\wfx32\bad\" & $c00)

Else

If Stringinstr($line, "Data Not Revised") then

runcmd("Move c:\wfx32\"&$version&"\"&$c00 & " c:\wfx32\needsrevised\" & $c00)

;Msgbox(0, "c00", $c00 & $version)

Else

If Stringinstr($line, "Zero Byte File") then

runcmd("Move c:\wfx32\"&$version&"\"&$c00 & " c:\wfx32\bad\zerobite\" & $c00)

;Msgbox(0, "c00", $c00 & $version)

Else

endIf

;If Stringlen($line) = 0 then

;Exit

;Else

EndIf

EndIf

EndIf

WEnd

Results.Log

CODE
---------- C:\WFX32\FAILED5070\REBUILD.LOG

[402] ERROR: Cannot revise to 2005 latest format: Check C:\WFX32\CLI-

[404] ERROR: Zero Byte File 'C:\WFX32\CLIENT\98006DC0.C00'. Please R-

[471] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[473] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\AAMODTJ0.C-

[483] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[485] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\ABRAMOS0.C-

[487] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[489] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\AHERNCH0.C-

[622] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[624] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\ALOISIG0.C-

[626] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[628] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\ALOISIM0.C-

[630] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[632] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\ALOISIN0.C-

[651] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[653] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\ANDOLIN0.C-

[832] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[834] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BANUKES0.C-

[923] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[925] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BARNES_0.C-

[954] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[956] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BASKETB0.C-

[1025] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[1027] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BEAMANA0.C-

[1121] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[1123] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BEN76910.C-

[1125] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[1127] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BENGTSS0.C-

[1129] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[1131] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BENTA980.C-

[1192] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

rebuild.log.. its in a format that cannot be read by my script..

CODE
ERROR: Cannot revise to 2005 latest format: Check C:\WFX32\CLI-

ENT\98006DC0.C00

ERROR: Zero Byte File 'C:\WFX32\CLIENT\98006DC0.C00'. Please R-

emove.

ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

7000: Check C:\WFX32\CLIENT\AAMODTJ0.C00

ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\AAMODTJ0.C-

00'.

Anyone have any Solution to my problem, or can the admin switch this to example scripts?

My theroy,

Is it possable to Convert (rebuild.log to one lines again) or reformat it...

Then i can reajust my scripts because all of the rebuild.log is the same... just diffrent files.

Link to comment
Share on other sites

Code process.au3

CODE
$version = inputbox("C00 Sorter", "Need to specify a Dir where the rebuild.log is. Example: failed5070", "failed5070")

;_Rundos('del c:\wfx32\results.log')

Runcmd('find /n /i "error" C:\wfx32\'&$version&'\'&$Filetosearch&' >> c:\wfx32\results.log')

;$version & $Filetosearch

;Msgbox(0, "c00", $c00 & $version)

Func RunCmd( $command )

Runwait( @ComSpec & " /C " & $command, "", @SW_HIDE )

$file = FileOpen("C:\wfx32\results.log",0)

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")

Exit

endif

EndFunc

;msgbox(0,"Move c:\wfx32\"&$version&"\"&$c00 & " c:\wfx32\bad\" & $c00)

While 1

$line = FileReadLine($file,$num)

$num = $num + 1

if StringInStr($line, "Check C:") Then

$line = StringTrimright ($line,12)

$c00 = stringright ($line,12)

Msgbox(0, "c00", $c00)

;msgbox(0,"test",)

If Stringinstr($line, "Incomplete C00") then

FileWriteLine($file, "")

;Runcmd('mkdir')

runcmd("Move c:\wfx32\"&$version&"\"&$c00 & " c:\wfx32\bad\" & $c00)

Else

If Stringinstr($line, "Data Not Revised") then

runcmd("Move c:\wfx32\"&$version&"\"&$c00 & " c:\wfx32\needsrevised\" & $c00)

;Msgbox(0, "c00", $c00 & $version)

Else

If Stringinstr($line, "Zero Byte File") then

runcmd("Move c:\wfx32\"&$version&"\"&$c00 & " c:\wfx32\bad\zerobite\" & $c00)

;Msgbox(0, "c00", $c00 & $version)

Else

endIf

;If Stringlen($line) = 0 then

;Exit

;Else

EndIf

EndIf

EndIf

WEnd

Results.Log

CODE
---------- C:\WFX32\FAILED5070\REBUILD.LOG

[402] ERROR: Cannot revise to 2005 latest format: Check C:\WFX32\CLI-

[404] ERROR: Zero Byte File 'C:\WFX32\CLIENT\98006DC0.C00'. Please R-

[471] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[473] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\AAMODTJ0.C-

[483] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[485] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\ABRAMOS0.C-

[487] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[489] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\AHERNCH0.C-

[622] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[624] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\ALOISIG0.C-

[626] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[628] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\ALOISIM0.C-

[630] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[632] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\ALOISIN0.C-

[651] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[653] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\ANDOLIN0.C-

[832] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[834] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BANUKES0.C-

[923] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[925] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BARNES_0.C-

[954] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[956] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BASKETB0.C-

[1025] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[1027] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BEAMANA0.C-

[1121] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[1123] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BEN76910.C-

[1125] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[1127] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BENGTSS0.C-

[1129] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

[1131] ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\BENTA980.C-

[1192] ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

rebuild.log.. its in a format that cannot be read by my script..

CODE
ERROR: Cannot revise to 2005 latest format: Check C:\WFX32\CLI-

ENT\98006DC0.C00

ERROR: Zero Byte File 'C:\WFX32\CLIENT\98006DC0.C00'. Please R-

emove.

ERROR: .C00 Missing Revise 2005.01000. Cannot revise to 2005.0-

7000: Check C:\WFX32\CLIENT\AAMODTJ0.C00

ERROR: Data Not Revised. Skipping 'C:\WFX32\CLIENT\AAMODTJ0.C-

00'.

Anyone have any Solution to my problem, or can the admin switch this to example scripts?

My theroy,

Is it possable to Convert (rebuild.log to one lines again) or reformat it...

Then i can reajust my scripts because all of the rebuild.log is the same... just diffrent files.

The question at hand is not clear to me, but...

FileReadLine() will automatically increment to the next line on each call, so I don't think you need to track it with $num.

Seems your script could easily read four lines from rebuild.log and assemble the full message into a single string before writing to results.log. Something like:

$line = ""
For $n = 1 To 4
     $line &= StringStripWS(FileReadLine($file), 7)
Next

But maybe I misunderstood the question... :)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Anyone have any Solution to my problem

maybe. what is your problem???

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

This would work but only if

CODE
Runcmd('find /n /i "error" C:\wfx32\'&$version&'\'&$Filetosearch&' >> c:\wfx32\results.log')

This program takes the rebuild.log and and searches by Error. Then displays results in results.log Well i posted before what happens. it cuts off the filename that i need for this script to copy the file in question to the Bad or needsrevised folders.

Can ya think of anyway to incorprated the 2 before the Dos command?

Be cause the Rebuild gets sorted by Error from the dos command then gets put into Results.log, but the Rebuild is the problem.. anyway to incorprate your idea into it?

error is :

The Id gets cut off and the rebuild is the problem, i need to format it is there anyway to do this to bring the 2 lines back as 1 (think the problem is a wordrapp problem.)

Edited by blacksniper
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...