{"id":18876324,"url":"https://github.com/carlosulisesochoa/path-as-a-comment-powershell","last_synced_at":"2026-05-01T18:31:56.884Z","repository":{"id":160119871,"uuid":"635060817","full_name":"CarlosUlisesOchoa/Path-as-a-comment-PowerShell","owner":"CarlosUlisesOchoa","description":"PowerShell script that automatically inserts the file path as a comment at the top of each compatible file.","archived":false,"fork":false,"pushed_at":"2023-05-06T16:58:19.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-23T19:37:37.399Z","etag":null,"topics":["path-as-a-comment","powershell","script","scripting","windows"],"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/CarlosUlisesOchoa.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":"2023-05-01T22:02:02.000Z","updated_at":"2024-11-12T00:21:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"8552576c-81a8-4939-af85-1fcb3d62fc59","html_url":"https://github.com/CarlosUlisesOchoa/Path-as-a-comment-PowerShell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CarlosUlisesOchoa/Path-as-a-comment-PowerShell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlosUlisesOchoa%2FPath-as-a-comment-PowerShell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlosUlisesOchoa%2FPath-as-a-comment-PowerShell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlosUlisesOchoa%2FPath-as-a-comment-PowerShell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlosUlisesOchoa%2FPath-as-a-comment-PowerShell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarlosUlisesOchoa","download_url":"https://codeload.github.com/CarlosUlisesOchoa/Path-as-a-comment-PowerShell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlosUlisesOchoa%2FPath-as-a-comment-PowerShell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32508900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["path-as-a-comment","powershell","script","scripting","windows"],"created_at":"2024-11-08T06:12:27.037Z","updated_at":"2026-05-01T18:31:56.861Z","avatar_url":"https://github.com/CarlosUlisesOchoa.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003ePath as a comment (PowerShell Script)\u003c/h1\u003e\n  \u003ca href=\"https://github.com/CarlosUlisesOchoa/Path-as-a-comment-PowerShell\"\u003e\u003cimg src=\"https://img.shields.io/badge/latest%20release-v1.0.0-blue\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/CarlosUlisesOchoa/Path-as-a-comment-PowerShell\"\u003e\u003cimg src=\"https://img.shields.io/badge/coverage-100%25-brightgreen\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/CarlosUlisesOchoa/Path-as-a-comment-PowerShell\"\u003e\u003cimg src=\"https://img.shields.io/tokei/lines/github/carlosulisesochoa/Path-as-a-comment-PowerShell\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/CarlosUlisesOchoa/Path-as-a-comment-PowerShell\"\u003e\u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/CarlosUlisesOchoa/Path-as-a-comment-PowerShell/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\nThis script automatically inserts the file path as a comment at the top of each compatible file. This helps developers quickly identify the location of a file while preventing any malfunctions (because the path is added as a comment)\n\n\u003cbr/\u003e\n\n## Table of Contents\n\n- [System Requirements](#system-requirements)\n- [Usage](#usage)\n- [Supported file extensions](#supported-file-extensions)\n- [License](#license)\n- [About developer](#about-developer)\n\n\u003cbr/\u003e\n\n## System Requirements\n\n- Windows OS (tested on Windows 10 and 11)\n- PowerShell 5.1 or later\n\n\u003cbr/\u003e\n\n## Usage\n\n1. [Download](https://raw.githubusercontent.com/CarlosUlisesOchoa/Path-as-a-comment-PowerShell/main/add-path.ps1) the `add-path.ps1` script.\n2. Save the script to a directory on your computer.\n3. Open PowerShell and navigate to the directory where the script is saved.\n4. Run the script with the `-d` parameter and specify the directory\n\n\u003cbr/\u003e\n\nExample:\n\n\u003cbr/\u003e\n\nPowerShell:\n```PowerShell\n.\\add-path.ps1 -d \"C:\\your_directory\"\n```\n\n\u003cbr /\u003e\n\n## Supported file extensions\n\nThe script supports the following file extensions. It adds their corresponding comment syntax:\n\n- *.js\n- *.jsx\n- *.ts\n- *.tsx\n- *.sass\n- *.less\n- *.scss\n- *.php\n- *.java\n- *.py\n- *.rb\n- *.css\n\nFor file extensions not included above, the script will not modify the file.\n\n\u003cbr/\u003e\n\n## Example\n\nLet's say we have a directory `C:\\your_directory` with the following structure:\n\n```\nyour_directory\n│\n└───js\n│   │   script.js\n│   │\n│   └───lib\n│           library.js\n│   \n└───css\n        style.css\n```\n\nAfter running the script, the files will have their file paths inserted as comments:\n\n`script.js`:\n\n```javascript\n// your_directory\\js\\script.js\n... (rest of the file content)\n```\n\n`library.js`:\n\n```javascript\n// your_directory\\js\\lib\\library.js\n... (rest of the file content)\n```\n\n`style.css`:\n\n```css\n/* your_directory\\css\\style.css */\n... (rest of the file content)\n```\n\n\u003cbr/\u003e\n\n## License\n\nThis project is released under the [MIT License](LICENSE).\n\n\u003cbr/\u003e\n\n## About developer\n\nVisit my web [Carlos Ochoa](https://carlos8a.com)\n\n\u003cbr/\u003e\n\n---\n\n**Note:** If you encounter any issues with the script, please report them [here](https://github.com/CarlosUlisesOchoa/Path-as-a-comment-PowerShell/issues). Contributions are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlosulisesochoa%2Fpath-as-a-comment-powershell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlosulisesochoa%2Fpath-as-a-comment-powershell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlosulisesochoa%2Fpath-as-a-comment-powershell/lists"}