cscp is a lightweight interactive wrapper around scp (Secure Copy) for fast LAN transfers.
It prompts for connection details, validates input, and remembers your last usage.
Designed for Windows PowerShell, typically targeting devices like Termux over SSH.
- Windows 10 / 11 with OpenSSH client (
scp) available - An SSH server on the target device (e.g., Termux)
- Copy the script:
mkdir -Force $HOME\.bin\ps | Out-Null
copy .\cscp.ps1 $HOME\.bin\ps\cscp.ps1- Run this to add it to your profile:
$fn = 'function cscp { powershell -ExecutionPolicy Bypass -File "$HOME\.bin\ps\cscp.ps1" @args }'
if (-not (Select-String -Path $PROFILE -Pattern 'function\s+cscp' -Quiet)) {
Add-Content -Path $PROFILE -Value "`n$fn"
}- Reload:
cscpcscp -Pull- Interactive prompts with defaults
- Input validation (port, IP, paths)
- Handles quoted Windows paths
- Detects directories and applies
-rautomatically - Retry logic when remote path is a directory
cscp stores your last inputs in:
$HOME\.cscp\history.json
It remembers:
- Last IP and port
- Last push source/destination
- Last pull source/destination
This enables:
- Fast repeated transfers (just press Enter)
- Consistent workflows without retyping paths
- Smooth back-and-forth push/pull cycles
cscp
# Port [8022]: [ENTER]
# IP [192.168.1.]: 42
# Local source: file.txt
# Remote destination [~]: [ENTER]cscp -Pull
# Port [8022]: [ENTER]
# IP [192.168.1.]: 42
# Remote source: ~/notes.txt
# Local destination [.]: Downloads- Type
qor pressEscat any prompt to abort - Tab cycles through local path suggestions
- Partial IP input (e.g.,
42) expands to192.168.1.42
MIT © MBK