This guide helps you set up and run Type Copy on Windows systems.
The easiest way to get started on Windows is to use the automatic setup script:
- Download the repository
- Double-click
setup.bator run in Command Prompt:setup.bat
The setup script will automatically:
- ✅ Check if Python is installed
- ✅ Download and install Python if needed
- ✅ Add Python to PATH
- ✅ Install pyperclip
- ✅ Verify everything works
- ✅ Run Type Copy
For PowerShell users:
# Right-click setup.ps1 → "Run with PowerShell"
# Or run as Administrator:
powershell -ExecutionPolicy Bypass -File setup.ps1If you prefer manual installation or the automatic setup doesn't work:
- Download Python from python.org
- IMPORTANT: During installation, check "Add Python to PATH"
- Click "Install Now"
- Verify installation:
python --version
Open Command Prompt or PowerShell and run:
pip install pyperclipProblem: Windows can't find Python in the PATH.
Solution:
- Find your Python installation (usually
C:\Users\YourName\AppData\Local\Programs\Python\Python3XX\) - Add to PATH manually:
- Right-click "This PC" → Properties
- Click "Advanced system settings"
- Click "Environment Variables"
- Under "User variables", select "Path" and click "Edit"
- Click "New" and add:
C:\Users\YourName\AppData\Local\Programs\Python\Python3XX\ - Click "New" again and add:
C:\Users\YourName\AppData\Local\Programs\Python\Python3XX\Scripts\ - Click OK on all dialogs
- Restart Command Prompt/PowerShell
Problem: PowerShell execution policy blocks scripts.
Solution A - Recommended (Run directly with Python):
python copy.cs.md.py.pySolution B - Change Execution Policy (One-time setup):
- Open PowerShell as Administrator (Right-click Start → "Windows PowerShell (Admin)")
- Run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- Type
Yand press Enter - Close PowerShell
Solution C - Bypass for single run:
powershell -ExecutionPolicy Bypass -File copy.cs.md.py.pyProblem: pip is not in PATH.
Solution:
python -m pip install pyperclipProblem: Windows User Account Control (UAC) or antivirus blocking execution.
Solutions:
- Run Command Prompt as Administrator
- Add Python folder to antivirus exclusions
- Use a folder in your user directory (not Program Files)
Problem: Pyperclip can't access clipboard.
Solution: Ensure no other applications are blocking clipboard access. Close any clipboard managers temporarily.
Create run_copy.bat in the same folder as the script:
@echo off
cd /d "%~dp0"
python copy.cs.md.py.py %*
if errorlevel 1 (
echo.
echo ERROR: Script failed to run.
echo Make sure Python and pyperclip are installed.
pause
)Now you can:
- Double-click
run_copy.batto run - Or drag it to your Start Menu for quick access
Create run_copy_no_tests.bat:
@echo off
cd /d "%~dp0"
python copy.cs.md.py.py --exclude test --exclude node_modules
pause- Right-click
run_copy.bat→ "Create shortcut" - Move shortcut to Desktop
- Right-click shortcut → Properties
- Click "Change Icon" and choose one you like
- In "Start in" field, enter the folder containing your code
Create run_copy.ps1:
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $scriptDir
python copy.cs.md.py.py $args
Read-Host "Press Enter to close"Run with:
powershell -ExecutionPolicy Bypass -File run_copy.ps1- Open Environment Variables (Win + Pause → Advanced → Environment Variables)
- Under "User variables", select "Path" → Edit
- Click "New" and add the folder containing
copy.cs.md.py.py - Click OK
- Restart Command Prompt
Now you can run from anywhere:
cd C:\MyProject
python copy.cs.md.py.py- Create
typecopy.batinC:\Users\YourName\(or any PATH folder):@echo off python "C:\Path\To\copy.cs.md.py.py" %*
- Add
C:\Users\YourName\to PATH - Run from anywhere:
typecopy --exclude test
If you use Windows Terminal:
- Open Settings (Ctrl + ,)
- Click "Open JSON file"
- Under "profiles" → "defaults", add:
"commandline": "cmd.exe /k python copy.cs.md.py.py"
Or create a new profile:
{
"name": "Type Copy",
"commandline": "cmd.exe /k cd /d C:\\Projects && python copy.cs.md.py.py",
"icon": "📋"
}Add "Copy to Clipboard" to right-click menu:
-
Create
add_context_menu.reg:Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\TypeCopy] @="Copy Code Files" "Icon"="C:\\Windows\\System32\\shell32.dll,134" [HKEY_CLASSES_ROOT\Directory\Background\shell\TypeCopy\command] @="cmd.exe /c cd /d \"%V\" && python \"C:\\Path\\To\\copy.cs.md.py.py\" && pause"
-
Double-click to add to registry
-
Now right-click in any folder → "Copy Code Files"
To remove: Create remove_context_menu.reg:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\TypeCopy]Run this command to test everything:
python test_copy.pyIf all tests pass, you're ready to go! ✅
-
Exclude large folders: Always exclude
node_modules,dist,build, etc.python copy.cs.md.py.py --exclude node_modules --exclude dist
-
Use SSD: Running from an SSD is much faster than HDD
-
Antivirus exclusion: Add the script folder to antivirus exclusions for faster scanning
- Check if another app is using clipboard
- Try running as Administrator
- Verify pyperclip is installed:
pip list | findstr pyperclip - Test pyperclip manually:
python -c "import pyperclip; pyperclip.copy('test'); print(pyperclip.paste())"
- Check if you're scanning a huge directory (use exclusions)
- Check if you're in a network drive (copy to local disk first)
- Press Ctrl+C to cancel
Windows 10 version 1511+ supports ANSI colors by default. If you don't see colors:
- Use Windows Terminal instead of cmd.exe
- Or enable in registry:
reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1
✅ Safe: This script only reads files and copies to clipboard
✅ No network: No data is sent anywhere
✅ Open source: You can review all code
If you're still having issues:
- Check Python version:
python --version(need 3.7+) - Check pip works:
pip --version - Reinstall pyperclip:
pip uninstall pyperclip && pip install pyperclip - Try in a fresh folder with just one test file
- Open an issue on GitHub with your error message
Here's a complete example for a new Windows user:
# 1. Install Python (from python.org)
# 2. Open Command Prompt and install dependency
pip install pyperclip
# 3. Download the script to your project folder
# (Place copy.cs.md.py.py in C:\Projects\MyApp)
# 4. Navigate to your project
cd C:\Projects\MyApp
# 5. Run the script
python copy.cs.md.py.py --exclude test
# 6. Paste the result into ChatGPT, Claude, or your code review
# Press Ctrl+VThat's it! 🎉