#################################################################################################### # 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\ # # FailSafe Setting is: \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 = ;;;;; # # # # Example: # # Profile = E:\SourcePath ; *.log ; true ; 10minutes ; LastWriteTime # #--------------------------------------------------------------------------------------------------# # First Parameter: # # 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: # # Give the Path to the files you want to process. # # Example: E:\SourcePath # #--------------------------------------------------------------------------------------------------# # Third Parameter: # # 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: # # 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: # # 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: # # 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