Search the Community
Showing results for tags 'read lines'.
-
Hi script read path to pst files from registry and write this informations to txt file. Unfortunately there are stored not needed lines: path to ost file, other line has string IndexAvailableBodyand first line is blank. How can i remove anything from txt file exept path to pst files ? Thanks in advance! #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <DateTimeConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <array.au3> #include <IE.au3> #include <WinAPIFiles.au3> #include <FileConstants.au3> #include <File.au3> #include <GUIListBox.au3> #include <Date.au3> $Form2 = GUICreate("Form1", 405, 294, 633, 264) $Button1 = GUICtrlCreateButton("Button1", 72, 48, 113, 33) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _searchPSTFiles() EndSwitch WEnd FUNC _searchPSTFiles() Global $aLines ;$sFileName = @ScriptDir & "\Pst.txt" $sFileNameTMP = @ScriptDir & "\Psttmp.txt" ;IF FileExists ($sFileName) then FileDelete ($sFileName) IF FileExists ($sFileNameTMP) then FileDelete ($sFileNameTMP) ;$logpathpst = FileOpen($sFileName, $FO_OVERWRITE) $logpathpsttmp = FileOpen($sFileNameTMP, $FO_OVERWRITE) Local $Outlookpst[30] For $i = 1 To 30 $Outlookpst[$i] = RegEnumVal("HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Search\", $i) If @error <> 0 Then ExitLoop If $Outlookpst = "" Then ContinueLoop EndIf FileWrite($logpathpstTMP, @CRLF & $Outlookpst[$i]) Next ;FileClose ($sFileName) FileClose ($sFileNameTMP) EndFunc
- 2 replies
-
- remove
- remove lines
-
(and 1 more)
Tagged with: