# FindReplaceCode **Repository Path**: mirrors_Faithlife/FindReplaceCode ## Basic Information - **Project Name**: FindReplaceCode - **Description**: Used to generate a new code project from a template. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-03-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FindReplaceCode Used to generate a new code project from a template. [![Build](https://github.com/Faithlife/FindReplaceCode/workflows/Build/badge.svg)](https://github.com/Faithlife/FindReplaceCode/actions?query=workflow%3ABuild) [![NuGet](https://img.shields.io/nuget/v/Faithlife.FindReplaceCode.Tool.svg)](https://www.nuget.org/packages/Faithlife.FindReplaceCode.Tool) [Documentation](https://faithlife.github.io/FindReplaceCode/) | [Release Notes](https://github.com/Faithlife/FindReplaceCode/blob/master/ReleaseNotes.md) | [Contributing](https://github.com/Faithlife/FindReplaceCode/blob/master/CONTRIBUTING.md) **WARNING:** This tool is recursively destructive. Please be extremely careful with it. This tool is installed as a dotnet tool: `dotnet tool install Faithlife.FindReplaceCode.Tool --global`. ## Usage ``` Usage: findreplacecode [ ...] ``` For example: ``` > findreplacecode C:\Code\MyItemApi MyItem CoolThing ``` ### Folder Path The first argument is the folder path. This tool may edit and/or rename every file and every folder in that folder and all of its subfolders, so be very careful where you point it. Normally you would point the tool at a folder where you have made a copy of a project or solution that you want to modify. ### Find and Replace Each pair of arguments after the folder path indicate *text to find* and *text to replace* it with. The find-and-replace is executed not only on the content of code files, but it is also used to rename files and folders. This tool also creates new a Visual Studio project GUID for each renamed `.csproj` and automatically substitutes that project GUID in any `.sln` file that references the old one. The find-and-replace is case-sensitive, but certain case variants are automatically replaced. For example, if you replace "MyItem" with "CoolThing", these replacements will also be executed: "myItem" for "coolThing", "myitem" for "coolthing", and "MYITEM" for "COOLTHING". If the find text is not sufficiently unique in the existing files, this tool may not work well. For example, replacing `Project` would break Visual Studio project and solution files. This tool isn't *that* smart. At least one find-and-replace pair is required. Any additional pairs are executed in the order they are provided. Any `.git` subfolders are automatically excluded from modification. ## Issues Only [certain file extensions](src/FindReplaceCode/ProgramSettings.cs) are currently considered for content replacement. Please let us know if there are others that should be added.