The complete folder structure has been changed or updated
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
####################################################################################################
|
||||
# Digital Data Configuration File (Template Date: 29.07.2016) #
|
||||
# UTF-8 Coding required! #
|
||||
# incl. FailSafe functions that are active when information is missing. #
|
||||
####################################################################################################
|
||||
|
||||
#==================================================================================================#
|
||||
########################################## General Setup ###########################################
|
||||
#==================================================================================================#
|
||||
|
||||
####################################################################################################
|
||||
# Path in which the log files will be stored. #
|
||||
# Example: E:\LogFiles\<ScriptName> #
|
||||
# FailSafe Setting is: <ScriptPath> #
|
||||
####################################################################################################
|
||||
LogPath =
|
||||
|
||||
####################################################################################################
|
||||
# Numerical value how long (in days) log files will be kept. #
|
||||
# Value of 0 disables the delete function completely. #
|
||||
# FailSafe Setting is: 60 #
|
||||
####################################################################################################
|
||||
LogFileKeepTime = 30
|
||||
|
||||
####################################################################################################
|
||||
# Special characters which is used to separate file versions. #
|
||||
# Example: File_4711_1606~2.pdf #
|
||||
####################################################################################################
|
||||
VersionSeperator = ~
|
||||
|
||||
####################################################################################################
|
||||
# Numerical value how old (in minutes) must be a File to be processed. #
|
||||
# Example: 1 #
|
||||
# FailSafe Setting is: 5 #
|
||||
####################################################################################################
|
||||
FileDelayAge = 0
|
||||
|
||||
####################################################################################################
|
||||
# Numeric Value for attempts to process locked files. #
|
||||
# Example: 10000000 #
|
||||
# FailSafe Setting is: 1000 #
|
||||
####################################################################################################
|
||||
FileCheckCounterLimit = 1000
|
||||
|
||||
#==================================================================================================#
|
||||
########################################## Profile Setup ###########################################
|
||||
#==================================================================================================#
|
||||
|
||||
####################################################################################################
|
||||
# Define Profiles in this config file for mapping network resources. #
|
||||
# Syntax: #
|
||||
# MountProfile = <SourcePath> ; <TargetLetter> ; <UserName|Domain\UserName> ; <Password> #
|
||||
# Example: #
|
||||
# MountProfile = \\path\share ; T ; domain\username ; password #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# First Parameter: <SourcePath> #
|
||||
# Set the path, you want to connect to. #
|
||||
# Example: \\path\share #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Second Parameter: <SourceFile> #
|
||||
# Set the local letter or PSDrive Share name. #
|
||||
# Example: T #
|
||||
# Example: Testdrive #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Third Parameter: <UserName|Domain\UserName> #
|
||||
# Set the Username (or domain\UserName) who has access rights to the share. #
|
||||
# Example: Administrator #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Fourth Parameter: <Password> #
|
||||
# Set the password for the Username above. #
|
||||
# Example: SecurePassword #
|
||||
####################################################################################################
|
||||
|
||||
####################################################################################################
|
||||
# Define up to 99 MoveOrCopy Profiles in this config file for the executing Script. #
|
||||
# Syntax: #
|
||||
# MOCF_Profile = move|copy ; *.<FileType>, ; <SourcePath> ; true|false ; writetest|readtest ; #
|
||||
# <DestinationPath> #
|
||||
# Example: #
|
||||
# MOCF_Profile = move ; *.* ; E:\SourcePath ; true ; writetest ; E:\DestinationPath #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Special Parameter: 3 - <SourcePath> #
|
||||
# -> Instead of the SourcePath you can write "%ProcessOnlyLastProfileFiles". #
|
||||
# If you do so, the files from the last Profile run will be processed by the current Profile. #
|
||||
# Because of this the set up FileType will be ignored! #
|
||||
# MOCF_Profile = move ; *.* ; %ProcessOnlyLastProfileFiles ; E:\DestinationPath #
|
||||
# #
|
||||
# Fourth Parameter: <ReclusiveSwitch> #
|
||||
# Determine if the SourcePath should be searched only in the main dir or even in every subfolder. #
|
||||
# Example: True --Search in every Subfolder under the specified Sourcefolder. #
|
||||
# Example: False --Search only in the specified Sourcefolder. #
|
||||
# #
|
||||
# Fifth Parameter: <filechecktyp> #
|
||||
# Determine if the SourceFile should be check only for readstate or read- and writestate. #
|
||||
# Remember, writetest could fail with some filetypes like pdfA or encrypted zip files. #
|
||||
# Example: writetest --Test File before processing if it is read and writeable. #
|
||||
# Example: readtest --Test File before processing if it is readable. #
|
||||
# #
|
||||
# NOTE: #
|
||||
# It is possible, to work with multiple Placeholders in the Sourcepath: #
|
||||
# Runtime Variable = %Date% #
|
||||
# File specific variables = %CreationTimeYear%, %CreationTimeMonth%, %CreationTimeDay%, #
|
||||
# %LastAccessTimeYear%, %LastAccessTimeMonth%, %LastAccessTimeDay%, #
|
||||
# %LastWriteTimeYear%, %LastWriteTimeMonth%, %LastWriteTimeDay% #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Optional Parameter: %FileDelayAge<Minutes> #
|
||||
# Numerical value how old (in minutes) must be a File to be processed. #
|
||||
# If you not using this Parameter, Script will use FileDelayAge Setting from the general setting. #
|
||||
# Example: #
|
||||
# MOCF_Profile = move ; *.pdf ; E:\SourcePath ; E:\DestinationPath ; %FileDelayAge15 #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Optional Parameter: %RegExGroup<GroupNumber> #
|
||||
# Regular Expression with selects the definied GroupNumber. Group 1 to 9 are available. #
|
||||
# Only defined RegEx Groups will be found, by this setting. Define Groups by using () in RegEx. #
|
||||
# If RegEx setting is matching file(s), the DestinationPath will be added with the \<RegExResult> #
|
||||
# Example: #
|
||||
# MOCF_Profile = move ; *.pdf ; E:\SourcePath ; E:\DestinationPath ; #
|
||||
# %RegExGroup1(?:%SCAN%&(DD-[a-zA-Z-]{1,})) #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Optional Parameter: %Replace<OldValue>,<NewValue> #
|
||||
# String which you can set to be replaced with an other String, or a blank Value. #
|
||||
# Replace setting will affect even results from the RegEx setting. #
|
||||
# Example: #
|
||||
# MOCF_Profile = move ; *.pdf ; E:\SourcePath ; E:\DestinationPath ; %Replace%SCAN%&, #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Argument call: #
|
||||
# If you need to run the Script with dynamic Values, you can do so, by calling it with arguments. #
|
||||
# Even the Special and Optional Parameters are available in this case. #
|
||||
# Example: #
|
||||
# powershell.exe -command "E:\MoveOrCopy.ps1 -argOperation copy -argFileTypes *.pdf #
|
||||
# -argSourcePath E:\SourcePath -argDestinationPath E:\DestinationPath -argFileDelayAge 15" #
|
||||
####################################################################################################
|
||||
|
||||
#MountProfile = \\path\share ; T ; domain\username ; password
|
||||
|
||||
MOCF_Profile = move; *Attm0.pdf ; E:\Testordner\input ; true ; writetest ; E:\Testordner\output1
|
||||
MOCF_Profile = move; %not% *Attm0.pdf ; E:\Testordner\input ; true ; writetest ; E:\Testordner\output2
|
||||
|
||||
#MOCF_Profile = copy; *.pdf ; E:\Testordner\input ; true ; writetest ; E:\Testordner\output
|
||||
#MOCF_Profile = copy; *.pdf ; %ProcessOnlyLastProfileFiles ; true ; writetest ; E:\Testordner\output ; %FileDelayAge5
|
||||
#MOCF_Profile = copy; *.pdf ; E:\Testordner\input ; true ; writetest ; E:\Testordner\output ; %FileDelayAge15 ; %RegExGroup1(?:%SCAN%&(DD-[a-zA-Z-]{1,})) ; %Replace%SCAN%&,
|
||||
BIN
current/DD-Core/MoveOrCopy-Files/MoveOrCopy-Files.ps1
Normal file
BIN
current/DD-Core/MoveOrCopy-Files/MoveOrCopy-Files.ps1
Normal file
Binary file not shown.
45
current/DD-Core/MoveOrCopy-Files/MoveOrCopy-Files_Caller.cmd
Normal file
45
current/DD-Core/MoveOrCopy-Files/MoveOrCopy-Files_Caller.cmd
Normal file
@@ -0,0 +1,45 @@
|
||||
@ECHO OFF
|
||||
TITLE DIGITAL DATA - Run all files in directory with current permissions
|
||||
ECHO -
|
||||
ECHO Batch Script
|
||||
ECHO Run all files in directory with current permissions
|
||||
ECHO -
|
||||
ECHO Digital Data
|
||||
ECHO Ludwig-Rinn-Strasse 16
|
||||
ECHO 35452 Heuchelheim
|
||||
ECHO Tel.: 0641 / 202360
|
||||
ECHO E-Mail: info@didalog.de
|
||||
ECHO -
|
||||
ECHO Version 1.0.0.0
|
||||
ECHO Date: 13.08.2015
|
||||
ECHO -
|
||||
ECHO Program Startup %date% at %time:~0,8% oclock, on %computername%.
|
||||
|
||||
REM --------------------------------------------------------------
|
||||
REM ------------------------set variables-------------------------
|
||||
REM --------------------------------------------------------------
|
||||
|
||||
setlocal enableextensions
|
||||
|
||||
SET DIRECTORY="%cd%"
|
||||
SET FILEEXTENSION=*.ps1
|
||||
SET COUNT=0
|
||||
|
||||
REM --------------------------------------------------------------
|
||||
REM ---------------------Program 1 / Script 1---------------------
|
||||
REM --------------------------------------------------------------
|
||||
|
||||
FOR /F "tokens=*" %%f in ('dir /S /b %FILEEXTENSION%') do (ECHO %%f && set /a count+=1)
|
||||
ECHO -
|
||||
ECHO Found %count% File(s) with File Extension %FILEEXTENSION% in Directory:
|
||||
ECHO %DIRECTORY%.
|
||||
|
||||
ECHO -
|
||||
ECHO Running this/them now, with your permissions!
|
||||
FOR /F "tokens=*" %%f in ('dir /S /b %FILEEXTENSION%') do (PowerShell.exe -Command "& {Start-Process PowerShell.exe -WindowStyle hidden '-ExecutionPolicy Bypass -File "%%f"'}")
|
||||
|
||||
ECHO -
|
||||
ECHO This Window will close in:
|
||||
#timeout /T 10
|
||||
endlocal
|
||||
exit
|
||||
37
current/DD-Core/MoveOrCopy-Files/MoveOrCopy-Files_Caller.vbs
Normal file
37
current/DD-Core/MoveOrCopy-Files/MoveOrCopy-Files_Caller.vbs
Normal file
@@ -0,0 +1,37 @@
|
||||
' VB Script Document
|
||||
' option explicit
|
||||
|
||||
' MoveOrCopy-Files_Caller
|
||||
' Verschiebe Dateien nacheinander nach einem definierten Muster
|
||||
|
||||
' Digital Data
|
||||
' Ludwig-Rinn-Straße 16
|
||||
' 35452 Heuchelheim
|
||||
' Tel.: 0641 / 202360
|
||||
' E-Mail: info@didalog.de
|
||||
|
||||
' Version 1.0.0.1
|
||||
' Letzte Aktualisierung: 05.08.2016
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------
|
||||
' Run a command. Copy that script block and paste it after this one, for step by step processing.
|
||||
'------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
' Create object
|
||||
Set objShell = CreateObject("Wscript.shell")
|
||||
|
||||
objShell.run("powershell -file D:\ScriptFiles\MoveOrCopy-Files\BatchBarcodeSeperator_Ende\MoveOrCopyFiles.ps1")
|
||||
|
||||
' Deallocate WScript Shell object
|
||||
Set objShell = Nothing
|
||||
|
||||
' Connect to Windows Management Instrumentation (WMI) object using a moniker
|
||||
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
|
||||
|
||||
' Execute a query to monitor process deletion
|
||||
Set colEvents = objWMIService.ExecNotificationQuery("Select * From __InstanceDeletionEvent " _
|
||||
& "Within 1 Where TargetInstance ISA 'Win32_Process' And TargetInstance.Name = 'powershell.exe'")
|
||||
|
||||
' Wait for process deletion event
|
||||
Set objEvent = colEvents.NextEvent
|
||||
'------------------------------------------------------------------------------------------------------------------
|
||||
152
current/DD-Core/MoveOrCopy-Files/MoveOrCopy-Files_History.txt
Normal file
152
current/DD-Core/MoveOrCopy-Files/MoveOrCopy-Files_History.txt
Normal file
@@ -0,0 +1,152 @@
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 1.5.2.1 - 18.08.2025
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: - Script accepts only one config file now
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Version 1.5.2.0 - 09.11.2024
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: - Updated Module loader to current "Import-CustomModule"
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.5.1.0 - 07.11.2024
|
||||
NEW: - Logging if files cannot get read (get-childitem)
|
||||
FIX: -
|
||||
CHG: - Using now "LiteralPath" instead of "Path" in copy, move and hash functions
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.5.0.0 - 21.02.2024
|
||||
NEW: - Es können nun Netzlaufwerke per "MountProfile" eingebunden werden
|
||||
FIX: -
|
||||
CHG: - Der aktuelle Module Loader wurde implementiert
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.3.3.0 - 12.12.2023
|
||||
NEW: - Man kann nun den Parameter %not% als negatives Suchkriterium verwenden
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.3.2.0 - 08.07.2021
|
||||
NEW: -
|
||||
FIX: - Fehler beim L schen von Logs behoben.
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.3.1.0 - 30.04.2021
|
||||
NEW: -
|
||||
FIX: - Fehler in File Collector Funktion behoben.
|
||||
- Fehler in Zielpfadbestimmung behoben, wenn Datei Attribute ausgelesen wurden.
|
||||
CHG: - File Collector listet nun vorab nicht mehr alle Dateien auf (machte das Skript zu langsam und die Logs zu gro ).
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.3.0.0 - 22.04.2021
|
||||
NEW: - Neuer Parameter f r Profile, es muss nun bestimmt werden, ob auch Unterverzeichnisse durchsucht werden (ReclusiveSwitch).
|
||||
- Neuer Parameter f r Profile, es muss nun bestimmt werden, wie eine Datei vor der Verarbeitung gepr ft wird (filechecktyp).
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.2.0.0 - 20.04.2021
|
||||
NEW: - Diverse Datumsplatzhalter f r den Zielpfad eingef gt (z.b.: %CreationTimeYear%, ...)
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.1.4.0 - 15.03.2019
|
||||
NEW: -
|
||||
FIX: - Schleifen Fehler bei %ProcessOnlyLastProfileFiles behoben
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.1.3.0 - 13.03.2019
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: - Log Dateien entschlackt
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.1.2.0 - 28.02.2019
|
||||
NEW: - %date% Variable hinzugef gt
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.1.1.0 - 24.02.2017
|
||||
NEW: -
|
||||
FIX: - Fehler in Schleifenz hler korrigiert.
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.1.0.1 - 01.08.2016
|
||||
NEW: -
|
||||
FIX: - Variablen Bereinigung vervollst ndigt.
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.1.0.0 - 29.07.2016
|
||||
NEW: - Neue optionale Parameter verf gbar: %RegExGroup and %Replace.
|
||||
FIX: -
|
||||
CHG: - Optionale Parameter folgen nun keiner spezifischen Reihenfolge mehr.
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
|
||||
Version 1.0.1.2 - 07.02.2016
|
||||
NEW: - Aufrufparameter nun verf gbar.
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.0.1.0 - 30.09.2015
|
||||
NEW: - Funktion "Func-File-check-state" nun eingebaut.
|
||||
FIX: -
|
||||
CHG: - Umbennung von "Simply_copy_or_move_Files" zu "MoveOrCopyFiles".
|
||||
REM: -
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Version 1.0.0.0 - 08.12.2014 - Erste funktionierende Version!
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
--------------------------Legende--------------------------
|
||||
NEW: = Hinzuf gen einer neuen Funktion
|
||||
FIX: = Korrektur einer vorhandenen Funktion
|
||||
CHG: = nderung oder Erweiterung einer vorhandenen Funktion
|
||||
REM: = Entfernen einer Funktion
|
||||
-----------------------------------------------------------
|
||||
Binary file not shown.
Reference in New Issue
Block a user