Windows PowerShell script and commands to list files and folders modified in past x days excluding specified folders like .git and node_modules (helps in backup)
Last updated on 5 Mar. 2025 5 Mar. 2025 Update I am too squeezed for time to update this post. The latest scripts are available on my public GitHub repo: https://github.com/ravisiyer/PS-Scripts . end- 5 Mar. 2025 Update Quick-Info ExcludeDirsRecurseListFilesDirs.ps1 : Recursively outputs Get-ChildItem returned object for files and directories of current working directory OR user specified directory but excludes folders and their contents present in $ExcludeFolders variable in script. Usage: script-name [optional-path] | next-cmd ... The next-cmd is important for making this script useful. An example: Lists last modified time followed by full path for each folder & file in current directory that was last modifed on 4.05.2024 (4th May) or 5.05.2024 excluding folders whose names are in $ExcludeFolders and such folders' contents script-name | where { ((get-date('5.05.2024'))-$_.LastWriteTime).days -lt 1 } | ForEach-Object {"$($_.LastWriteTime) $($_.FullName)"}...