Hi,
ich arbeite momentan an einem Backup Tool für die Firma.
Habe also testweise mal, den kompletten System32 Ordner im laufenden Betrieb kopiert.
erst die Verzeichnisse eingelesen und erstellt. Danach die Dateien kopiert.
Spoiler anzeigen
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.3.8.1
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]; Script Start - Add your code below here
#include <Array.au3>
$pfad = "C:\Windows\System32\"
global $ordner = _RecursiveFileListToArray($pfad, '', 2)
Global $dateien = _RecursiveFileListToArray($pfad, '', 1)
_ArrayDisplay($dateien,"dateien")
_ArrayDisplay($ordner,"ordner")
for $a = 1 to $ordner[0]
$ordner[$a] = Stringtrimleft($ordner[$a],19)
;msgbox(0,"",$ordner[$a])
Dircreate(@scriptdir & "\est\" & $ordner[$a])
Next
msgbox(0,"","ordner done")
for $i = 1 to $dateien[0]
;$dateien[$i] = StringTrimLeft($dateien[$i],19)
;msgbox(0,"",@scriptdir & "\est\" & StringTrimLeft($dateien[$i],20))
FIlecopy($dateien[$i],@scriptdir & "\est\" & StringTrimLeft($dateien[$i],20))
Next
msgbox(0,"","Dateien done")
Func _RecursiveFileListToArray($sPath, $sPattern, $iFlag = 0, $iFormat = 1, $sDelim = @CRLF)
Local $hSearch, $sFile, $sReturn = ''
If StringRight($sPath, 1) <> '\' Then $sPath &= '\'
$hSearch = FileFindFirstFile($sPath & '*.*')
If @error Or $hSearch = -1 Then Return SetError(0, 0, $sReturn)
While True
$sFile = FileFindNextFile($hSearch)
If @error Then ExitLoop
If StringInStr(FileGetAttrib($sPath & $sFile), 'D') Then
If StringRegExp($sPath & $sFile, $sPattern) And ($iFlag = 0 Or $iFlag = 2) Then $sReturn &= $sPath & $sFile & '\' & $sDelim
$sReturn &= _RecursiveFileListToArray($sPath & $sFile & '\', $sPattern, $iFlag, 0)
ContinueLoop
EndIf
If StringRegExp($sFile, $sPattern) And ($iFlag = 0 Or $iFlag = 1) Then $sReturn &= $sPath & $sFile & $sDelim
WEnd
FileClose($hSearch)
If $iFormat Then Return StringSplit(StringTrimRight($sReturn, StringLen($sDelim)), $sDelim, $iFormat)
Return $sReturn
EndFunc ;==>_RecursiveFileListToArray
Folgendes Problem:
[Blockierte Grafik: http://img713.imageshack.us/img713/9956/unbenanntrhm.png]
Liegt das jetzt an versteckten Systemdateien oder an dem Zugriff vom System oder oder oder?
Und wie kann ichs beheben?