select case?
beau <[email protected]> Wed, 29 Aug 2007 13:20:10 -0500
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
Hi group,
I have a select case question
my first select is there away to put them together so it wood ch the
file copy an file size or do they need to be two like i have them thanks
#Include <File.au3>
#Include <Array.au3>
Global $text1, $text2
$FileOut = 'C:\new\error.txt'
$originalDir = 'C:\wdisplay\'
$destinationDir = 'C:\new\wd19'
FileClose(FileOpen($FileOut, 2))
DirCreate($destinationDir)
$status = ''
$FileList = _FileListToArray($originalDir, "**", 1)
$FolderList = _FileListToArray($originalDir, '**', 2)
If @error = 1 Then
MsgBox(0, "", "No Files\Folders Found.")
Exit
EndIf
;_ArrayDisplay($FileList,"$FileList")
_ArrayDisplay($FolderList,'$FolderList')
For $n = 1 To $FileList[0]
$Filetest = FileCopy($originalDir&$FileList[$n],$destinationDir&'/',8)
; MsgBox(0,"",$originalDir&'\'&$FileList[$n]&$destinationDir&'/' )
Select
Case $Filetest = 1
$Filetest = "OK"
Case $Filetest = 0
$Filetest = "error"
EndSelect
Select
Case FileGetSize( $originalDir&$FileList[$n] )== FileGetSize(
$destinationDir&'\'&$FileList[$n])
MsgBox(0,"1", 'ok' )
EndSelect
;MsgBox(0,"1", ))
$text1 &= $originalDir & $FileList[$n] & ' -> ' & $destinationDir &
$FileList[$n] & ' ' & $Filetest & @CRLF
;MsgBox(0,"",FileGetSize( $destinationDir&'\'&$FileList[$n]))
Next
FileWrite($FileOut, $text1)
For $n = 1 To $FolderList[0]
$DirTest =
DirCopy($originalDir&$FolderList[$n],$destinationDir&'\'&$FolderList[$n],0)
Select
Case $DirTest = 1
$DirTest = "OK"
Case $DirTest = 0
$DirTest = "error"
EndSelect
$text2 &= $originalDir & $FolderList[$n] & ' -> ' & $destinationDir
& $FolderList[$n] & ' ' & $DirTest & @CRLF
;MsgBox(0,"", $text2)
Next
FileWrite($FileOut, $text2)