Готовый перевод Утилита для поиска и/или удаления старых файлов и папок. / Outdated files removal tool.: .DESCRIPTION

Search and remove old files or folders.

.DESCRIPTION
This script searchs and removes outdated files or forlders with all content. To determine the "age" of a file/folder can be used different techniques: analysis of the file attributes (last access time, last write time, creation time), parsing a file name to extract timestamp or the number of a file.

To determine which files (folders) is out-of-date used retention conditions specified in script parameters. Note that if specified script parameters will lead to removing all input files, exception will be thrown.

.PARAMETER iaPath
Path list. Relative and avsolute paths are permitted.

.PARAMETER iaFSItem
List of the [IO.FileSystemInfo] objects.

.PARAMETER iDirPath
Alias : Dir
Path to the input directory that need to clean.
To obtain a list files the gci command will be used.

.PARAMETER iAction
Alias : A
Action that will be performed. Valid values are:

* 'List', 'L'
Return the list of filenames that are determined as old. [String[]].

Return the list of objects with information about files that are determined as old. [psobject[]]

* 'Remove', 'R'
Remove files that are determined as old. No output.
In this mode at least one of iRetentionCnt, iRetentionPeriod, iRetentionLenTot parameters is required.

.PARAMETER iSortBy
Alias : S
Default: 'Name'
The sorting algorithm for the input collection of files.. Valid values are:

* 'Name' - sort by filename (without path) or by timestamp or number parsed from filename.
To setup filename parse options use parameters iNamePattern and iNameFormat.

* 'CTime' - sort by the file creation time.
In this mode parameters iNamePattern, iNameFormat and iNameNotMatchedTreatAs are prohibited.

* 'ATime' - sort by the file last access time.
In this mode parameters iNamePattern, iNameFormat and iNameNotMatchedTreatAs are prohibited.

* 'MTime' - sort by the file modification time.
In this mode parameters iNamePattern, iNameFormat and iNameNotMatchedTreatAs are prohibited.

Переведено на Нотабеноиде
http://notabenoid.org/book/60658/287329

Переводчики: TEH3OP

Настройки

Готово:

34.88% КП = 1.0

Непереведённые фрагменты будут пропущены.