{"id":14980475,"url":"https://github.com/iricigor/getfolderage","last_synced_at":"2026-01-16T01:39:14.301Z","repository":{"id":109049338,"uuid":"151771634","full_name":"iricigor/GetFolderAge","owner":"iricigor","description":"PowerShell commandlet which checks for last modified date for large number of big folders","archived":false,"fork":false,"pushed_at":"2018-11-14T15:53:57.000Z","size":279,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T06:27:12.745Z","etag":null,"topics":["azure-devops","azure-pipelines","fileserver","folder-structure","last-modified","last-write-time","modification-date","path-too-long","powershell","powershell-cmdlets","powershell-core","powershell-script"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iricigor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-05T19:59:32.000Z","updated_at":"2022-12-05T01:47:49.000Z","dependencies_parsed_at":"2023-04-28T14:30:41.505Z","dependency_job_id":null,"html_url":"https://github.com/iricigor/GetFolderAge","commit_stats":{"total_commits":94,"total_committers":3,"mean_commits":"31.333333333333332","dds":0.4148936170212766,"last_synced_commit":"a53ec6a3213450dd2cdbe965eec2de1a4898a2a0"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iricigor%2FGetFolderAge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iricigor%2FGetFolderAge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iricigor%2FGetFolderAge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iricigor%2FGetFolderAge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iricigor","download_url":"https://codeload.github.com/iricigor/GetFolderAge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256075,"owners_count":20909240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-devops","azure-pipelines","fileserver","folder-structure","last-modified","last-write-time","modification-date","path-too-long","powershell","powershell-cmdlets","powershell-core","powershell-script"],"created_at":"2024-09-24T14:01:49.530Z","updated_at":"2026-01-16T01:39:14.261Z","avatar_url":"https://github.com/iricigor.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GetFolderAge\n\nLatest version:\n![GitHub Latest Release](https://img.shields.io/github/release/iricigor/GetFolderAge.svg)\n![GitHub Release Date](https://img.shields.io/github/release-date/iricigor/GetFolderAge.svg)\n![GitHub repo size in bytes](https://img.shields.io/github/repo-size/iricigor/GetFolderAge.svg)\n\nPowerShell script which checks for last modified date _(LastWriteTime)_ for a large number of folders.\nIt checks recursively for all files and folders inside taking into account potential errors (inaccessible files, too long paths, etc.).\n\nRunning a script itself will just import (i.e. create) new commandlet **`Get-FolderAge`** in your session.\nIt will not do any checks.\nYou can afterwards run this commandlet with proper parameters as in examples below.\n\nRunning commandlet with specifying only a folder name will return last modification time of that folder.\nIf you specify `-CutOffDate` (or `-CutoffDays`) script will determine if the folder was modified after that time. It will exit folder search as soon as it finds a modified file or folder.\n\nCommandlet can be run in unattended mode also with file output using `-OutputFileName` parameter. Output format is comma-separated value, so file extension should be `.csv`.\n\nTechnical explanation of LastModifiedDate can be seen in [this archived copy](https://web.archive.org/web/20110604022236/http://support.microsoft.com/kb/299648) of Microsoft knowledge base article.\n\n## Download\n\nYou can download this script in a couple of ways listed below. Execute a script after downloading it (no admin rights needed) to add commandlet `Get-FolderAge` to your session.\n\n- **Download from GitHub:**\nYou can see online latest script version at this [link](https://github.com/iricigor/GetFolderAge/blob/master/Get-FolderAge.ps1).\nThe raw PS1 file can be downloaded from [here](https://raw.githubusercontent.com/iricigor/GetFolderAge/master/Get-FolderAge.ps1).\n\n- **Clone repository:**\nIf you want to see the entire GitHub repository, just clone it\n\n`git clone https://github.com/iricigor/GetFolderAge.git`\n\n- **From PowerShell Gallery** _(preferred way)_:\nScript can be downloaded from [PS Gallery](https://www.powershellgallery.com/packages/Get-FolderAge) using the command \n\n`Save-Script Get-FolderAge -Repository PSGallery -Path 'MyFolder'`\n\n## Help and Examples\n\n![Screenshot 1](img/Screenshot_1.jpg)\n\n### Details\n\nFor more examples and full parameter's explanation, run `Get-Help Get-FolderAge -Full` or see the [online version](Get-FolderAge.md).\n\n### Examples\n\n* `Get-FolderAge -Folder '\\\\server\\Docs'`\n\nReturns last modification date of the specified folder.\n\n* `Get-FolderAge -Folder '\\\\FileServer01.Contoso.com\\Users' -TestSubFolders`\n\nReturns last modification date for each user share on a file server.\n\n* `Get-FolderAge -InputFile 'ShareList.txt' -OutputFile 'ShareScanResults.csv' -CutoffDays 3`\n\nTests if folders listed in specified input file (one folder per line) are modified since \"cut-off\" 3 days ago. Results are saved to file in csv format.\n\n### Input parameters\n\nInput can be specified in three ways:\n\n* parameter `-FolderName` _(default parameter, can be omitted)_ followed by string or an array of strings specifying paths to be checked\n* via pipeline - the same values as above can be passed via pipeline, see the example with `Get-ChildItem`\n* parameter `-InputFile` - a file specifying folders to be processed, one folder per line\n\n![Screenshot 2](img/Screenshot_2.png)\n\n### Cut-off Date explanation\n\nCut-off date represents the point in time for which we want to know if a folder was modified after.\nUsually, this is the date when last copy or backup or sync was performed on the given folder.\n\nIt can be specified as:\n\n* PowerShell [DateTime] object, i.e. the value returned by Get-Date command\n* An integer number representing days since last cut-off date (easier, but less precise)\n\n### Output format\n\nCommandlet outputs array of objects. Each object contains these properties:\n\n* [string]`Path` - as specified in input parameters (or obtained subfolder names)\n* [datetime]`LastWriteTime` - latest write time for all items inside of the folder\n* [bool]`Modified` - if the folder was modified since last cut-off date (or null if date not given)\n\nIt also outputs diagnostic/statistics info:\n\n* [bool]`Confident` - if Modified return value is a confident result; in case commandlet is called with QuickTest switch, return value for Modified might not be correct.\n* [int]`TotalFiles` - total number of files and directories scanned\n* [int]`TotalFolders` - total number of directories scanned\n* [string]`LastItem` - an item with the latest timestamp found (note that this might not be really the latest modified file. If this timestamp is newer than CutOffDate, commandlet will not search further.\n* [int]`Depth` - total depth of scanned folders relative to initial folder. If QuickTest, then it will be 1, regardless of real depth. If CutOffDate specified, it might not go to full depth, so this number will be smaller than full depth.\n* [decimal]`ElapsedSeconds` - time spent in checking the folder\n* [datetime]`StartTime` - date and time when folder check started\n* [datetime]`FinishTime` - date and time when folder check was completed\n* [bool]`Errors` - indicate if command encountered errors during its execution (i.e. Access Denied on some file)\n* [string]`LastError` - text of the last encountered error\n* [string]`LastErrorItem` - file/folder which raised last error\n\n### Restartable script\n\nParameter `-OutputFile` specifies where output data is stored on the disk.\nIf the script is interrupted before finishing, you can restart it without a need to process same folders again.\nJust specify the same `-OutputFile` and `-InputFile` and script will skip already processed folders!\n\nThis is especially useful for long running scripts.\n\n## Build status\n\nEach commit or PR to master is checked on [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/) [Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) on two build systems:\n\n1. Ubuntu **Linux** v.16.04 LTS host running PowerShell (Core) v.6.1 [![Linux Build Status](https://dev.azure.com/iiric/GetFolderAge/_apis/build/status/GetFolderAge-Linux-CI)](https://dev.azure.com/iiric/GetFolderAge/_build/latest?definitionId=7)\n2. **Windows** host running Windows PowerShell v.5.1 [![Windows Build Status](https://dev.azure.com/iiric/GetFolderAge/_apis/build/status/GetFolderAge-Win-CI)](https://dev.azure.com/iiric/GetFolderAge/_build/latest?definitionId=6)\n\n## Support\n\nYou can chat about this commandlet via [Skype](https://www.skype.com) _(no Skype ID required)_, by clicking a link below.\n\n[![chat on Skype](https://img.shields.io/badge/chat-on%20Skype-blue.svg?style=flat)](https://join.skype.com/hQMRyp7kwjd2)\n\n## Contributing\n\nIf you find any problems, feel free to open a new issue.\n\n![GitHub open issues](https://img.shields.io/github/issues/iricigor/GetFolderAge.svg?style=flat)\n![GitHub closed issues](https://img.shields.io/github/issues-closed/iricigor/GetFolderAge.svg?style=flat)\n\nIf you want to contribute, please fork the code and make a new PR after!\n\n![GitHub](https://img.shields.io/github/license/iricigor/GetFolderAge.svg?style=flat)\n![GitHub top language](https://img.shields.io/github/languages/top/iricigor/GetFolderAge.svg?style=flat)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firicigor%2Fgetfolderage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firicigor%2Fgetfolderage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firicigor%2Fgetfolderage/lists"}