8
0
Skriptentwickung/current/DD-Core/Remove-ItemByAge/DEFAULT/Remove-ItemByAge_Settings.ini

99 lines
8.2 KiB
INI

####################################################################################################
# Digital Data Configuration File (Template Date: 30.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>\Logs #
####################################################################################################
LogPath =
####################################################################################################
# Numerical value how long (in days) log files will be kept. ValidateRange is 0 - 1000 #
# Setting the Value to 0 disables this Function. #
# FailSafe Setting is: 60 #
####################################################################################################
LogFileKeepTime = 30
#==================================================================================================#
########################################## Profile Setup ###########################################
#==================================================================================================#
####################################################################################################
# Define Profiles in this config file for the executing Script. #
# Syntax: #
# Profile = <ProfileType>;<SourcePath>;<FileType>;<ReclusiveSwitch>;<DeleteItemsOlderThen>; #
# <DeleteItemsFileSystemAttribute> #
# Example: #
# Profile = E:\SourcePath ; *.log ; true ; 10minutes ; LastWriteTime #
#--------------------------------------------------------------------------------------------------#
# First Parameter: <ProfileType> #
# Determine which kind of Objects should be processed. #
# By choosing Folders for deletion, ONLY EMPTY Folders will be deleted #
# (Hidden System Files will be ignored). #
# FailSafe Setting is: FoldersOnly #
# Example: FilesOnly #
# Example: FoldersOnly #
# Example: FilesAndFolders #
#--------------------------------------------------------------------------------------------------#
# Second Parameter: <SourcePath> #
# Give the Path to the files you want to process. #
# Example: E:\SourcePath #
#--------------------------------------------------------------------------------------------------#
# Third Parameter: <FileType> #
# Set the File extensions you want to search for, in the specified SourcePath. #
# Example: *.* --This means every File Extension. #
# Example: *.pdf --This means only Files with the Extension "pdf". #
#--------------------------------------------------------------------------------------------------#
# 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: <DeleteItemsOlderThen> #
# Define how old file/folder must be, before deletion. Minutes, Hours, Days and Years are possible.#
# Example: 15minutes #
# Example: 5hours #
# Example: 3days #
# Example: 4years #
#--------------------------------------------------------------------------------------------------#
# Sixth Parameter: <DeleteItemsFileSystemAttribute> #
# Define which FileSystem Attribut will be used in correspondence with the fifth Parameter. #
# FailSafe Setting is: LastWriteTime #
# Example: CreationTime #
# Example: LastAccessTime #
# Example: LastWriteTime #
#--------------------------------------------------------------------------------------------------#
# Argument call: #
# If you need to run the Script with dynamic Values, you can do so, by calling it with Arguments. #
# Configured Profiles in INI-File will be ignored! #
# The Arguments are the same as the Parameters in the configuration below. #
# Every Argument can be used by position or name. #
# Example: #
# Remove-ItemByAge.ps1 "FilesAndFolders" "E:\OldFiles" "*.*" "true" "1days" "CreationTime" #
# Example: #
# Remove-ItemByAge.ps1 -ProfileType "FilesAndFolders" -SourcePath "E:\OldFiles" -FileType "*.*" #
# -ReclusiveSwitch "true" -DeleteItemsOlderThen "1days" #
# -DeleteItemsFileSystemAttribute "CreationTime" #
####################################################################################################
Profile = FilesAndFolders ; E:\KammM - Kopie ; *.* ; true; 5minutes ; CreationTime
#Profile = FilesOnly ; E:\LogFiles\SomeApp ; *.log ; true ; 15minutes ; LastWriteTime
#Profile = FoldersOnly ; E:\LogFiles\SomeApp ; *.log ; true ; 5hours ; CreationTime
#Profile = FilesAndFolders ; E:\LogFiles\SomeApp ; *.log ; true ; 3days ; LastWriteTime
#Profile = FilesAndFolders ; E:\LogFiles\SomeApp ; *.log ; true ; 4years ; LastAccessTime