agent47 Posted December 17, 2009 Share Posted December 17, 2009 hi thnx, I was trying on the code and i am not able to perform the operation so can u kindly fix a bug in my code #include <file.au3> Dim $aArray Dim $path Dim $path1 Dim $i Dim $fila Dim $filo $path="c:\rpt.txt" $path1="c:\rpt1.txt" $fila=_FileReadToArray($path,$aArray) If @error Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf $filo=_FileReadToArray($path1,$aArray) If @error Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf $aArray=$aArray[$i] For $i = 1 to 10 $aArray = FileMove($fila,$filo & "\",8) Next FileClose($fila) FileClose($filo) MsgBox(0,"File","moved") Kindly help with this thnxrpt.txtrpt1.txt Link to comment Share on other sites More sharing options...
99ojo Posted December 17, 2009 Share Posted December 17, 2009 Hi, try this: #include <file.au3> Local $path="c:\rpt.txt" Local $path1="c:\rpt.txt" Local $i Dim $fila Dim $filo _FileReadToArray($path,$fila) ; reading c:\rpt.txt into array If @error Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf _FileReadToArray($path1,$filo) ; reading c:\rpt1.txt into array If @error Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf For $i = 1 to UBound ($fila) - 1 $split = StringSplit ($fila [$i], "\") ; get mp3 file name, last value from array $split is filename FileMove($fila [$i],$filo [$i] & "\" & $split [UBound ($split) - 1],8) MsgBox (0,"File moved", $fila [$i] & @CRLF & $filo [$i] & "\" & $split [UBound ($split) - 1]) Next ;MsgBox(0,"File","moved") ;-)) Stefan Link to comment Share on other sites More sharing options...
agent47 Posted December 17, 2009 Author Share Posted December 17, 2009 Hi, try this: #include <file.au3> Local $path="c:\rpt.txt" Local $path1="c:\rpt.txt" Local $i Dim $fila Dim $filo _FileReadToArray($path,$fila) ; reading c:\rpt.txt into array If @error Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf _FileReadToArray($path1,$filo) ; reading c:\rpt1.txt into array If @error Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf For $i = 1 to UBound ($fila) - 1 $split = StringSplit ($fila [$i], "\") ; get mp3 file name, last value from array $split is filename FileMove($fila [$i],$filo [$i] & "\" & $split [UBound ($split) - 1],8) MsgBox (0,"File moved", $fila [$i] & @CRLF & $filo [$i] & "\" & $split [UBound ($split) - 1]) Next ;MsgBox(0,"File","moved") ;-)) Stefan Hey, Many Thanks it is working Link to comment Share on other sites More sharing options...
enaiman Posted December 17, 2009 Share Posted December 17, 2009 Dude - when you are asking for help, stick to your original thread. If I'm not wrong this is the 4th thread open for the same issue and that's a big No-No. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now