r/PowerShell • u/javiprieto_89 • 22d ago
Script Sharing I modernized a classic DOS-era file-transfer batch tool in PowerShell 7 (USB splitting, FTP, OneDrive, Dropbox, ISO) – feedback welcome
Hi all,
I've been working on Llevar, a PowerShell 7 rewrite of LLEVAR.BAT, a classic batch tool by Alex Soft (Alejandro Nacir) for moving big folders around when plain copy isn't enough.
What it does
- Compresses and splits data into blocks (for USB sticks, floppies, or size-limited targets)
- Transfers between local paths, UNC shares, FTP/FTPS, OneDrive and Dropbox
- Can generate an ISO instead of writing to USB
- Interactive menu (and plain parameters for scripting)
Quick try
.\Llevar.ps1 -Source "C:\Data" -Target "D:\Backup" -Compress -SplitThe core idea: path detection + a dispatcher
Every source/destination is classified by a tiny set of validators:
function Test-IsFtpPath { param([string]$Path) return ($Path -match '^ftp://|^ftps://') }
function Test-IsOneDrivePath{ param([string]$Path) return ($Path -match '^ONEDRIVE:') }
function Test-IsDropboxPath { param([string]$Path) return ($Path -match '^DROPBOX:') }
function Test-IsUncPath { param([string]$Path) return ($Path -match '^\\\\') }Then a single dispatcher routes each origin→destination pair to the right function (abridged):
function Invoke-TransferDispatcher {
param($Llevar, [bool]$ShowProgress = $true, [int]$ProgressTop = -1)
$tipoOrigen = $Llevar.Origen.Tipo
$tipoDestino = $Llevar.Destino.Tipo
$route = "$tipoOrigen→$tipoDestino"
$result = switch ($tipoOrigen) {
"Local" {
switch ($tipoDestino) {
"Local" { Invoke-LocalToLocal -Llevar $Llevar ... }
"FTP" { Invoke-LocalToFtp -Llevar $Llevar ... }
"OneDrive" { Invoke-LocalToCloud -Llevar $Llevar -CloudType "OneDrive" ... }
"USB" { Invoke-LocalToUSB -Llevar $Llevar ... }
"ISO" { Invoke-LocalToISO -Llevar $Llevar ... }
default { throw "Unsupported combination: Local→$tipoDestino" }
}
}
"FTP" { ... } # same pattern for FTP, OneDrive, Dropbox and UNC sources
}
}Requires PowerShell 7+ on Windows 10/11.
Repo: https://github.com/javiprieto89/Llevar (there's an animated demo of the menu at the top of the README)
Disclosure: parts of this project were developed with the help of AI tools (Claude).
I'd really like feedback on:
- Which destination would be most useful next (SFTP? S3? Google Drive?)
- Anything that breaks in your scenario
- Would you use it as a PowerShell Gallery module?
If it's useful, a star helps others find it. Thanks!