Copy Filtered Project Files is a simple and efficient tool to selectively copy essential files from a project directory while excluding unnecessary folders like node_modules and/or files like app.log, build directories, and lock files. Perfect for streamlining your project backups or sharing a clean version of your codebase.
- 🗂️ Selective Copying: Only copies the files you want, leaving out unnecessary files and folders.
- 🧹 Clean Project Transfer: Ideal for creating clean, shareable versions of your project.
- ⚡ Quick Setup: Easy to configure with a customizable list of exclusions.
-
Edit the Exclusion Lists:
-
Modify the exclusion lists in
CopyFilteredProjectFiles.ps1to suit your needs. -
You can exclude folders like
node_modules,buildand files likepackage-lock.json,.logfiles, etc. -
Exclude folder and its subfolders and files within using
$excludedFolders = @("out", ".webpack", "node_modules", "target", "icons", "build") -
Exlcude files using:
$excludedFiles = @("package-lock.json", "Cargo.lock", "app.log")
-
-
Run the Batch Script:
- Double-click
RunCopyFilteredProjectFiles.batto execute the PowerShell script and copy the filtered files.
- Double-click
-
Check the Destination:
- The filtered files will be copied to the specified destination directory, ready for use or sharing.
- You can edit the destination location output by editting:
$rootDirectory = "C:\Users\user\Desktop\project-folder"
Copy code
├── CopyFilteredProjectFiles.ps1 # PowerShell script for filtering and copying files
├── RunCopyFilteredProjectFiles.bat # Batch script to run the PowerShell script- Source Directory: Update the $rootDirectory variable in
CopyFilteredProjectFiles.ps1to point to your project directory. - Destination Directory: Change the $destinationDirectory variable to set where the filtered files should be copied.
- Exclusion Lists: Adjust the
$excludedFoldersand$excludedFilesarrays to exclude additional files or folders.
- Clone this repository to your local machine.
- Edit the PowerShell script as needed.
- Run the batch script to filter and copy your project files.
Feel free to submit issues or pull requests if you have ideas for improvement or find any bugs!
This project is open-source and available under the MIT License.