09-01-2023
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
Imports ECM.JobRunner.Windows.Scheduler.Jobs
|
||||
Imports Quartz
|
||||
Imports Quartz
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DigitalData.Modules.Filesystem
|
||||
Imports ECM.JobRunner.Common
|
||||
Imports FxResources.System
|
||||
|
||||
Namespace Scheduler.Jobs
|
||||
|
||||
@@ -14,7 +12,7 @@ Namespace Scheduler.Jobs
|
||||
Private FileEx As File
|
||||
|
||||
Public Function Execute(context As IJobExecutionContext) As Task Implements IJob.Execute
|
||||
Dim oArgs = MyBase.InitializeJob(context)
|
||||
Dim oArgs = InitializeJob(context)
|
||||
|
||||
Try
|
||||
FileEx = New File(LogConfig)
|
||||
@@ -46,14 +44,14 @@ Namespace Scheduler.Jobs
|
||||
|
||||
LogInfo("{0} files found in source directory {1}", oFileNames.Count.ToString, oProfile.SourceFolder)
|
||||
|
||||
' - [ ] Process Rules, build list of files and indexes
|
||||
' - [x] Process Rules, build list of files and indexes
|
||||
' - [x] Process Regex to filter out files
|
||||
' - [x] Check time to filter out files
|
||||
' - [ ] (Check if files can be accessed)
|
||||
' - [ ] Check if backup is needed and backup files
|
||||
' - [x] Import into windream
|
||||
' - [ ] Create original subfolder structure
|
||||
' - [ ] Create DateTime Subfolders
|
||||
' - [x] Create DateTime Subfolders
|
||||
' - [x] Check if file exists and version
|
||||
' - [x] Do import
|
||||
' - [ ] Check for filesize 0
|
||||
@@ -186,7 +184,7 @@ Namespace Scheduler.Jobs
|
||||
|
||||
If pProfile.SubfolderDateFormat <> String.Empty Then
|
||||
' ToString formatter needs the backslashes escaped again.
|
||||
Dim oSubfolders = Now.ToString(pProfile.SubfolderDateFormat.Replace())
|
||||
Dim oSubfolders = Now.ToString(pProfile.SubfolderDateFormat.Replace("\", "\\"))
|
||||
Dim oFullPath = IO.Path.Combine(pProfile.TargetFolder, oSubfolders)
|
||||
|
||||
Logger.Debug("Creating subfolder [{0}] in Target path [{1}]", oSubfolders, pProfile.TargetFolder)
|
||||
@@ -201,7 +199,7 @@ Namespace Scheduler.Jobs
|
||||
|
||||
' Generate new filepath and stream file
|
||||
Dim oFileName = IO.Path.GetFileName(pFile.FilePath)
|
||||
Dim oNewFilePath As String = IO.Path.Combine(pProfile.TargetFolder, oFileName)
|
||||
Dim oNewFilePath As String = IO.Path.Combine(oFinalDirectoryPath, oFileName)
|
||||
Dim oVersionedFilePath = GetVersionedWindreamPath(oNewFilePath)
|
||||
|
||||
If Windream.NewFileStream(pFile.FilePathOriginal, oVersionedFilePath, pProfile.ObjectTypeName) = False Then
|
||||
|
||||
Reference in New Issue
Block a user