File Orchestrator
File Orchestrator is a powerful VS Code extension that simplifies file management operations for related files in your projects. It allows you to rename, copy, move, delete, and create files while automatically handling associated files with different extensions.
Features
- Rename Files: Rename a file and all its related files with different extensions.
- Copy Files: Create copies of a file and its related files.
- Move Files: Move a file and its related files to a different directory, with an option to rename.
- Delete Files: Remove a file and all its related files.
- Create Files: Create new files with specified extensions in a chosen directory.
- Jump to Related Files: Quickly navigate between related files.
- Bulk Replace: Perform string replacements across related files.
- Customizable Extension Lists: Define and use custom lists of related file extensions.
Installation
- Open VS Code
- Go to the Extensions view
- Search for "File Orchestrator"
- Click Install
Usage
Commands
File Orchestrator adds the following commands to the Command Palette (Ctrl+Shift+P or Cmd+Shift+P):
File Orchestrator: Rename File
File Orchestrator: Copy File
File Orchestrator: Move File
File Orchestrator: Delete File
File Orchestrator: Create File
File Orchestrator: Jump To Related File
File Orchestrator: String Replace In Related Files
Workflow
- Open a file in the editor.
- Run one of the File Orchestrator commands.
- Select the extension list to apply (Default or custom lists).
- Follow the prompts to complete the operation.
Extension Lists
File Orchestrator uses extension lists to determine which related files to include in operations. You can configure these lists in your VS Code settings.
Default Extensions
Set the default extensions in your settings.json
:
{
"fileOrchestrator.defaultExtensions": [
".cpp",
".hpp",
".cxx",
".hxx",
".c",
".h"
]
}
Custom Extension Lists
Define custom extension lists for different project types:
{
"fileOrchestrator.customExtensionLists": {
"Qt-Cpp": [".cpp", ".hpp", ".cxx", ".hxx", ".c", ".h", ".ui"]
}
}
Keyboard Shortcuts
You can configure a custom keyboard shortcut for the "Jump To Related File" command:
{
"fileOrchestrator.jumpToRelatedFileShortcut": "alt+p"
}
Examples
Renaming a C++ Component
- Open
MyComponent.cpp
- Run
File Orchestrator: Rename File
- Select the "Qt-Cpp" extension list
- Enter the new name, e.g., "NewComponent"
- The extension will rename:
MyComponent.cpp
to NewComponent.cpp
MyComponent.hpp
to NewComponent.hpp
MyComponent.ui
to NewComponent.ui
Moving a Vue Component
- Open
OldComponent.vue
- Run
File Orchestrator: Move File
- Select the "Vue" extension list
- Enter the target directory (relative to workspace root)
- Choose whether to rename the file
- The extension will move:
OldComponent.vue
OldComponent.js
OldComponent.css
- Open a file, e.g.,
Component.cpp
- Press
Alt+P
(or your configured shortcut)
- Select the related file from the quick pick menu
- Select the text you want to replace in the active file
- Run
File Orchestrator: String Replace In Related Files
- Enter the replacement text
- The extension will perform the replacement in all related files
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This extension is licensed under the MIT License.