{"id":27629283,"url":"https://github.com/ggfevans/powershell-compare-directories","last_synced_at":"2025-07-30T19:18:10.378Z","repository":{"id":287470346,"uuid":"964804828","full_name":"ggfevans/powershell-compare-directories","owner":"ggfevans","description":"A simple PowerShell script for comparing two directory structures to identify file differences.","archived":false,"fork":false,"pushed_at":"2025-04-11T22:08:53.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T15:15:56.459Z","etag":null,"topics":["compare","directory","powershell","system-administration-tools"],"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/ggfevans.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2025-04-11T20:17:53.000Z","updated_at":"2025-04-11T22:08:49.000Z","dependencies_parsed_at":"2025-04-11T23:22:20.381Z","dependency_job_id":null,"html_url":"https://github.com/ggfevans/powershell-compare-directories","commit_stats":null,"previous_names":["ggfevans/powershell-compare-directories"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fpowershell-compare-directories","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fpowershell-compare-directories/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fpowershell-compare-directories/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fpowershell-compare-directories/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggfevans","download_url":"https://codeload.github.com/ggfevans/powershell-compare-directories/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250457791,"owners_count":21433734,"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":["compare","directory","powershell","system-administration-tools"],"created_at":"2025-04-23T15:15:59.991Z","updated_at":"2025-04-23T15:16:00.499Z","avatar_url":"https://github.com/ggfevans.png","language":"PowerShell","readme":"# powershell-compare-directories\n\n![PowerShell Version](https://img.shields.io/badge/PowerShell-5.1+-blue.svg)\n![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey)\n![License](https://img.shields.io/badge/license-MIT-green.svg)\n\nA simple PowerShell script for comparing two directory structures to identify file differences.\n\n## Compare-DirectoryStructure.ps1\n\nThis script helps identify:\n- Missing files between directories\n- Files with different sizes or timestamps\n- Optional content comparison with MD5 hashes\n\n## Requirements\n\n- PowerShell 5.1 or higher\n- Works on Windows, macOS (with PowerShell Core), and Linux (with PowerShell Core)\n- No additional modules required\n- Standard user permissions (admin privileges not required unless comparing protected directories)\n- Sufficient memory for large directory comparisons (memory usage scales with the number of files)\n\nThe script is designed to be cross-platform compatible with minimal dependencies, making it easy to use in various environments.\n\n## Usage\n\n```powershell\n.\\Compare-DirectoryStructure.ps1 -folderA \"C:\\SourceFiles\" -folderB \"D:\\BackupFiles\"\n\n# With additional options\n.\\Compare-DirectoryStructure.ps1 -folderA \"C:\\SourceFiles\" -folderB \"D:\\BackupFiles\" -showProgress -checkContent -outputFile \"results.csv\"\n```\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `folderA` | String | Yes | Source directory |\n| `folderB` | String | Yes | Target directory |\n| `outputFile` | String | No | Save results as CSV |\n| `showProgress` | Switch | No | Display progress bar |\n| `checkContent` | Switch | No | Compare file contents with MD5 |\n| `includeMissingFromA` | Switch | No | Find files in B missing from A |\n\n## Installation\n\n### Direct Download\n\n1. Download `Compare-DirectoryStructure.ps1` from this repository\n2. Save it to your preferred scripts directory\n3. Run it directly using PowerShell\n\nThat's it! No complex setup required.\n\nExample:\n```powershell\n# Navigate to where you saved the script\ncd C:\\Path\\To\\Scripts\n\n# Run the script with parameters\n.\\Compare-DirectoryStructure.ps1 -folderA \"C:\\SourceFiles\" -folderB \"D:\\BackupFiles\"\n```\n\n## Sample Output\n\n```\nFound 3 differences.\n\nFile                FolderA_Size FolderB_Size Difference Status\n----                ------------ ------------ ---------- ------\nconfig.json         1245         978          Size       Different\ndata.csv            45678        Missing      Missing    Missing in Folder B\nbackup.ps1          Missing      2341         Missing    Missing in Folder A\n\nSummary:\n- Missing in Folder B: 1\n- Missing in Folder A: 1\n- Different Files: 1\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggfevans%2Fpowershell-compare-directories","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggfevans%2Fpowershell-compare-directories","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggfevans%2Fpowershell-compare-directories/lists"}