MS DeleteScans CheckScanFolder

This commit is contained in:
Digital Data - Marlon Schreiber 2018-01-23 16:33:27 +01:00
parent 073be6abce
commit d7ffdb06c0
6 changed files with 458 additions and 2544 deletions

1
.gitignore vendored
View File

@ -154,3 +154,4 @@ $RECYCLE.BIN/
# Mac desktop service store files
.DS_Store
/.vs/Global_Indexer/v15/Server/sqlite3

View File

@ -66,6 +66,7 @@
Public CURR_DELETE_ORIGIN As Boolean = False
Public CURRENT_DT_REGEX As DataTable
Public REGEX_CLEAN_FILENAME As String = "[?*^""<>|]"
Public CURRENT_DROPTYPE
End Module

View File

@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.9.9.5")>
<Assembly: AssemblyVersion("1.9.9.6")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: NeutralResourcesLanguageAttribute("")>

File diff suppressed because it is too large Load Diff

View File

@ -1753,6 +1753,7 @@ Public Class frmIndex
CURRENT_ISATTACHMENT = False
DropType = ClassDatabase.Execute_Scalar("SELECT HANDLE_TYPE FROM TBGI_FILES_USER WHERE GUID = " & CURRENT_WORKFILE_GUID, MyConnectionString, True)
chkdelete_origin.Visible = False
CURRENT_DROPTYPE = DropType.Replace("|", "")
If DropType = "|DROPFROMFSYSTEM|" Then
chkdelete_origin.Visible = True
chkdelete_origin.Checked = CURR_DELETE_ORIGIN
@ -1794,6 +1795,7 @@ Public Class frmIndex
Me.Text = "Indexing of email-Attachment:"
End If
ElseIf DropType = "|FW_SIMPLEINDEXER|" Then
If USER_LANGUAGE = "de-DE" Then
Me.Text = "Indexierung einer Folderwatch-Datei:"
Else
@ -2436,8 +2438,11 @@ Public Class frmIndex
Sub DeleteFile()
Try
If CURR_DELETE_ORIGIN = False Then
If LogErrorsOnly = False Then ClassLogger.Add(">> DeleteFile - CURR_DELETE_ORIGIN = False", False)
Exit Sub
If CURRENT_DROPTYPE <> "FW_SIMPLEINDEXER" Then
If LogErrorsOnly = False Then ClassLogger.Add(">> DeleteFile - CURR_DELETE_ORIGIN = False", False)
Exit Sub
End If
End If
File.Delete(CURRENT_WORKFILE)
Catch ex As Exception

View File

@ -485,6 +485,34 @@ Public Class frmStart
tslblFW.Visible = True
Else
tslblFW.Visible = False
End If
If FWSCAN_started = True Then
Dim fileEntries As String() = Directory.GetFiles(CURRENT_SCAN_FOLDERWATCH)
' Process the list of files found in the directory.
Dim fileName As String
For Each fileName In fileEntries
For Each row As DataRow In DTEXCLUDE_FILES.Rows
Dim content As String = row.Item(0).ToString.ToLower
If fileName.ToLower.Contains(content) Then
Exit Sub
End If
Next
Dim handleType As String
If fileName.ToLower.EndsWith(".msg") Then
handleType = "|FW_OUTLOOK_MESSAGE|"
Else
handleType = "|FW_SIMPLEINDEXER|"
End If
'Die Datei übergeben
If LogErrorsOnly = False Then ClassLogger.Add(">> Adding file from Scanfolder after startup:" & fileName, False)
If ClassIndexFunctions.FileExistsinDropTable(fileName) = False Then
ClassFilehandle.Decide_FileHandle(fileName, handleType)
Else
ClassLogger.Add(">> Scanfolder Startup: File already exists:" & fileName, False)
End If
Next fileName
End If
If TimerFolderWatch.Enabled = False Then
TimerFolderWatch.Start()