PowerShell utility that instantly saves your clipboard content to organized files with timestamped names.
- Smart Detection: Automatically detects images and text in your clipboard
- Instant Save: One command saves clipboard content with zero configuration
- Organized Output: Files saved with clean timestamps (
YYYYMMDD_HHMMSSformat) - Conflict Resolution: Automatically handles duplicate filenames by appending numbers
- Configurable: Simple INI-based configuration with sensible defaults
- Error Handling: Friendly error messages with pause prompts to read before window closes
- Explorer Integration: Optionally open Windows Explorer with the saved file selected
- Download: Clone or download
clip-to-file.ps1 - Run: Execute the script from PowerShell
.\clip-to-file.ps1
- Done: Your clipboard content is now saved!
- Input: Any image copied to clipboard (screenshots, copied images from web, etc.)
- Output:
20250118_143025.jpg(saved as high-quality JPEG)
- Input: Any text copied to clipboard
- Output:
20250118_143025.txt(saved as UTF-8 text file)
If a file with the same timestamp exists, the script automatically appends a number:
20250118_143025.jpg20250118_143025_1.jpg20250118_143025_2.jpg
The script creates a clip-to-file.ini configuration file on first run:
[Settings]
SavePath=C:\Users\YourName\Downloads
OpenFolderAfterSave=false| Setting | Default | Description |
|---|---|---|
SavePath |
Downloads folder | Directory where files will be saved |
OpenFolderAfterSave |
false |
When true, opens Windows Explorer with the saved file selected |
Customization: Edit the INI file to change settings
Transform this into a super-powered clipboard tool by mapping it to a keyboard shortcut!
- Install AutoHotkey
- Create a script file (e.g.,
clipboard-hotkey.ahk):; AutoHotkey v2 syntax ; Ctrl+Alt+V to save clipboard ^!v::Run('powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\path\to\clip-to-file.ps1"')
- Run the AutoHotkey script
- Enjoy: Press
Ctrl+Alt+Vto instantly save clipboard content!
Make your hotkey portable without requiring AutoHotkey installation:
- Right-click your
.ahkfile - Select "Compile Script" (if you have AutoHotkey installed)
- Or use Ahk2Exe compiler directly
- Result: A standalone
.exefile that runs on any Windows PC
The compiled EXE:
- Works without AutoHotkey installed
- Can be added to Windows startup folder
- Portable - share with colleagues or use on multiple PCs
- Small file size (~1-2 MB)
- Right-click
clip-to-file.ps1β "Create shortcut" - Right-click the shortcut β "Properties"
- Click in the "Shortcut key" field
- Press your desired key combination (e.g.,
Ctrl+Alt+V) - Click "OK"
- Windows (PowerShell 5.1 or later)
- .NET Framework (included with Windows)
# Basic usage
.\clip-to-file.ps1
# Copy an image, then run
.\clip-to-file.ps1
# Output: Image saved to: C:\Users\You\Downloads\20250118_143025.jpg
# Copy some text, then run
.\clip-to-file.ps1
# Output: Text saved to: C:\Users\You\Downloads\20250118_143025.txtSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser- Check that the configured save path exists and you have write permissions
- The script will attempt to create the directory if it doesn't exist
- Ensure you have content copied to your clipboard before running the script
- Only images and text content are supported
- Error messages windows are not automatically closed
- This ensures you can read error messages when running from shortcuts or double-clicking
- Screenshots: Instantly save screenshots with organized naming
- Code Snippets: Quickly save copied code to timestamped files
- Research: Save copied text and images during web browsing
- Documentation: Organize clipboard content for later reference
Free to use, modify, and distribute. No attribution required.
Made for productivity enthusiasts π
