|
| 1 | +# Windows Folder Remark/Comment Tool |
| 2 | + |
| 3 | +**[English](README.en.md)** | [中文文档](README.md) |
| 4 | + |
| 5 | +[](https://www.python.org/downloads/) |
| 6 | +[](LICENSE) |
| 7 | +[](README.en.md) |
| 8 | +[](README.md) |
| 9 | + |
| 10 | +A lightweight CLI tool to add remarks/comments to Windows folders via Desktop.ini. No system residency, no data upload, safe and secure, use it when you need it. Perfect for organizing your files with custom descriptions. |
| 11 | + |
| 12 | +## ⭐ Star Us |
| 13 | + |
| 14 | +If you find this tool helpful, please consider giving it a star on GitHub! |
| 15 | + |
| 16 | +## Why This Tool |
| 17 | + |
| 18 | +- **Use and Go**: Runs when needed, exits when done — no system residency |
| 19 | +- **Safe & Secure**: Completely local operation, no data upload, privacy protected |
| 20 | +- **Portable**: Single-file exe packaging, no installation required |
| 21 | + |
| 22 | +## Features |
| 23 | + |
| 24 | +- Multi-language character support (UTF-16 encoding) |
| 25 | +- Multi-language interface support (English, Chinese) |
| 26 | +- Command-line and interactive modes |
| 27 | +- Automatic encoding detection and repair |
| 28 | +- Automatic update checking to stay current |
| 29 | +- Right-click menu integration for quick access |
| 30 | +- Single-file exe packaging, no Python environment required |
| 31 | + |
| 32 | +## Installation |
| 33 | + |
| 34 | +### Method 1: Using exe file (Recommended) |
| 35 | + |
| 36 | +Download `windows-folder-remark.exe` from [releases](https://github.com/piratf/windows-folder-remark/releases) and use directly. |
| 37 | + |
| 38 | +### Method 2: Install from source |
| 39 | + |
| 40 | +```bash |
| 41 | +# Clone repository |
| 42 | +git clone https://github.com/piratf/windows-folder-remark.git |
| 43 | +cd windows-folder-remark |
| 44 | + |
| 45 | +# Install dependencies (no external dependencies) |
| 46 | +pip install -e . |
| 47 | + |
| 48 | +# Run |
| 49 | +python -m remark.cli --help |
| 50 | +``` |
| 51 | + |
| 52 | +## Usage |
| 53 | + |
| 54 | +### Command-line Mode |
| 55 | + |
| 56 | +```bash |
| 57 | +# Add remark |
| 58 | +windows-folder-remark.exe "C:\MyFolder" "This is my folder" |
| 59 | + |
| 60 | +# View remark |
| 61 | +windows-folder-remark.exe --view "C:\MyFolder" |
| 62 | + |
| 63 | +# Delete remark |
| 64 | +windows-folder-remark.exe --delete "C:\MyFolder" |
| 65 | + |
| 66 | +# Check updates |
| 67 | +windows-folder-remark.exe --update |
| 68 | + |
| 69 | +# Install right-click menu |
| 70 | +windows-folder-remark.exe --install |
| 71 | + |
| 72 | +# Uninstall right-click menu |
| 73 | +windows-folder-remark.exe --uninstall |
| 74 | +``` |
| 75 | + |
| 76 | +### Interactive Mode |
| 77 | + |
| 78 | +```bash |
| 79 | +# Follow prompts after running |
| 80 | +windows-folder-remark.exe |
| 81 | +``` |
| 82 | + |
| 83 | +### Right-click Menu (Recommended) |
| 84 | + |
| 85 | +After installing the right-click menu, you can add remarks directly in File Explorer by right-clicking folders: |
| 86 | + |
| 87 | +```bash |
| 88 | +# Install right-click menu |
| 89 | +windows-folder-remark.exe --install |
| 90 | +``` |
| 91 | + |
| 92 | +- **Windows 10**: Right-click folder to see "Add Folder Remark" |
| 93 | +- **Windows 11**: Right-click folder → Click "Show more options" → Add Folder Remark |
| 94 | + |
| 95 | +### Auto Update |
| 96 | + |
| 97 | +The program automatically checks for updates on exit (once every 24 hours) and prompts if a new version is available. |
| 98 | + |
| 99 | +You can also manually check for updates: |
| 100 | + |
| 101 | +```bash |
| 102 | +windows-folder-remark.exe --update |
| 103 | +``` |
| 104 | + |
| 105 | +## Encoding Detection |
| 106 | + |
| 107 | +When viewing remarks with `--view`, if the `desktop.ini` file is not in standard UTF-16 encoding, the tool will prompt you: |
| 108 | + |
| 109 | +``` |
| 110 | +Warning: desktop.ini file encoding is utf-8, not standard UTF-16. |
| 111 | +This may cause Chinese and other special characters to display abnormally. |
| 112 | +Fix encoding to UTF-16? [Y/n]: |
| 113 | +``` |
| 114 | + |
| 115 | +Select `Y` to automatically fix the encoding. |
| 116 | + |
| 117 | +## Development |
| 118 | + |
| 119 | +```bash |
| 120 | +# Install development dependencies |
| 121 | +pip install -e ".[dev]" |
| 122 | + |
| 123 | +# Run tests |
| 124 | +pytest |
| 125 | + |
| 126 | +# Code check |
| 127 | +ruff check . |
| 128 | +ruff format . |
| 129 | + |
| 130 | +# Type check |
| 131 | +mypy remark/ |
| 132 | + |
| 133 | +# Build exe locally |
| 134 | +python -m scripts.build |
| 135 | +``` |
| 136 | + |
| 137 | +## How It Works |
| 138 | + |
| 139 | +This tool implements folder remarks through these steps: |
| 140 | + |
| 141 | +1. Create/modify `Desktop.ini` file in the folder |
| 142 | +2. Write `[.ShellClassInfo]` section and `InfoTip` property |
| 143 | +3. Save file with UTF-16 encoding |
| 144 | +4. Set `Desktop.ini` as hidden and system attributes |
| 145 | +5. Set folder as read-only (makes Windows read `Desktop.ini`) |
| 146 | + |
| 147 | +Reference: [Microsoft Official Documentation](https://learn.microsoft.com/en-us/windows/win32/shell/how-to-customize-folders-with-desktop-ini) |
| 148 | + |
| 149 | +## Notes |
| 150 | + |
| 151 | +- May take a few minutes to display in File Explorer after modification |
| 152 | +- Some file managers may not support folder remarks |
| 153 | +- The tool modifies system attributes of folders |
| 154 | + |
| 155 | +## License |
| 156 | + |
| 157 | +MIT License |
0 commit comments