Ms
This commit is contained in:
@@ -9,8 +9,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WIDigForm", "WIDigForm\WIDi
|
||||
EndProject
|
||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupWIX", "SetupWIX\SetupWIX.wixproj", "{3943E21A-DD2B-4C74-B06F-9A39CAA70E11}"
|
||||
EndProject
|
||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupWIXVS19", "SetupWIXVS19\SetupWIXVS19.wixproj", "{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -41,12 +39,6 @@ Global
|
||||
{3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|x86.ActiveCfg = Release|x86
|
||||
{3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|x86.Build.0 = Release|x86
|
||||
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|x86.Build.0 = Debug|x86
|
||||
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|x86.ActiveCfg = Release|x86
|
||||
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -37,7 +37,7 @@ Module Module1
|
||||
'Dim oArguments As String() = Environment.GetCommandLineArgs()
|
||||
If ParseArgs(args) = True Then
|
||||
System.Console.WriteLine($"Parsed all arguments!")
|
||||
If StreamIndexFile() = True Then
|
||||
If StreamORIndexFile() = True Then
|
||||
oErrorImport = False
|
||||
oReturnResult = 1
|
||||
Else
|
||||
@@ -169,17 +169,28 @@ Module Module1
|
||||
oArg = oArg.Replace("""", "")
|
||||
If oArg.StartsWith("-Source@") Then
|
||||
oSourceFile = oArg.Replace("-Source@", "")
|
||||
If IsNumeric(oSourceFile) Then
|
||||
LOGGER.Info($"SourceFile seems to be a DocID [{oSourceFile}]")
|
||||
Dim oSQL = $"SELECT [dbo].[FNDD_GET_WINDREAM_FILE_PATH] ({oSourceFile})"
|
||||
oSourceFile = _database.GetScalarValue(oSQL)
|
||||
End If
|
||||
If System.IO.File.Exists(oSourceFile) = False Then
|
||||
LOGGER.Warn($"Parser@Sourcefile - File [{oSourceFile}] is not existing!")
|
||||
oErrorMessage &= vbNewLine & $"Parser@Sourcefile - File [{oSourceFile}] is not existing!"
|
||||
oErrorParse = True
|
||||
Return False
|
||||
End If
|
||||
|
||||
ElseIf oArg.StartsWith("-Mode@") Then
|
||||
oMode = oArg.Replace("-Mode@", "").ToUpper
|
||||
|
||||
ElseIf oArg.StartsWith("-Target@") Then
|
||||
oTargetPath = oArg.Replace("-Target@", "")
|
||||
If IsNumeric(oTargetPath) Then
|
||||
LOGGER.Info($"Target seems to be a DocID [{oTargetPath}]")
|
||||
Dim oSQL = $"SELECT [dbo].[FNDD_GET_WINDREAM_FILE_PATH] ({oTargetPath})"
|
||||
oSourceFile = _database.GetScalarValue(oSQL)
|
||||
End If
|
||||
Dim oWMFolder = System.IO.Path.GetDirectoryName(oTargetPath)
|
||||
Dim oWindowsPath = oTargetPath
|
||||
oExtension = Path.GetExtension(oWindowsPath)
|
||||
@@ -234,14 +245,16 @@ Module Module1
|
||||
oIndexArr = oIndexparts
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Warn("Error in ParseArgs:" & vbNewLine & ex.Message)
|
||||
oErrorMessage &= vbNewLine & "Error in ParseArgs:" & vbNewLine & ex.Message
|
||||
oErrorParse = True
|
||||
System.Console.WriteLine($"Error in ParseArgs - {Now.ToString}")
|
||||
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function StreamIndexFile()
|
||||
Public Function StreamORIndexFile()
|
||||
Try
|
||||
Dim oResult As Boolean = False
|
||||
If oMode = "IMPV" Then
|
||||
@@ -259,7 +272,10 @@ Module Module1
|
||||
|
||||
|
||||
If oResult = True Then
|
||||
If oMode <> "NI" Then
|
||||
LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...")
|
||||
End If
|
||||
|
||||
For Each oIndex2 As String In oIndexArr
|
||||
Dim oIndexInfo() = oIndex2.Split("={")
|
||||
Dim oIndexName = oIndexInfo(0)
|
||||
@@ -302,13 +318,14 @@ Module Module1
|
||||
Loop
|
||||
Next
|
||||
If oResult = True Then
|
||||
LOGGER.Info("Import finished!")
|
||||
LOGGER.Info("## All Tasks finished ##")
|
||||
oErrorImport = False
|
||||
End If
|
||||
End If
|
||||
Return oResult
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn($"Error while indexing: {ex.Message}")
|
||||
LOGGER.Warn($"Unexpected Error in StreamORIndexFile: {ex.Message}")
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Binary file not shown.
@@ -254,9 +254,9 @@ IMPO = wenn die übergebene Datei bereits vorhanden ist, wird die bereits vorhan
|
||||
Datei in Windream gelöscht und mit der neuen Datei ersetzt!
|
||||
NI = (Nachindexierung) Erneuert die Index-Werte mit den übergebenen.
|
||||
-Source:
|
||||
Pfad zur Quelldatei
|
||||
Pfad zur Quelldatei ODER windream-DocID
|
||||
-Target:
|
||||
Zielpfad inklusive Dateiname und Extension
|
||||
Zielpfad inklusive Dateiname und Extension ODER windream-DocID
|
||||
-WMOT:
|
||||
Windream Objekttyp
|
||||
-index
|
||||
|
||||
Reference in New Issue
Block a user