sqmRobocopyGui is a PowerShell module with a WinForms GUI for robocopy. Pick source and target with the Explorer folder dialog or drag them in, tick the options you need, each with its help text, and the finished command line appears immediately, validated live against the mistakes that make robocopy fail or delete more than intended. Then run it right there: dry run with /L first, live log, progress and the exit code in plain words. Or take it away as a batch file, a PowerShell script or a scheduled task. No dependencies beyond robocopy itself.
robocopy is the tool for large copies, mirrors and file server migrations, and it has close to a hundred switches with their own syntax. The classic failures are small: "D:\Target\" in quotes, where the backslash escapes the quote and robocopy reports an invalid parameter; /MIR pointed at the wrong folder; no /R, so a single locked file is retried a million times, 30 seconds apart. sqmRobocopyGui catches those while you click.
| By hand | With sqmRobocopyGui |
|---|---|
| Paths typed or pasted, quotes and trailing backslashes by trial and error | Explorer folder dialog, history, drag and drop; directories always written without a trailing backslash |
robocopy /? in a second window to look up /DCOPY, /XJD or /MAXLAD | Every option in its category with short help in the row and the full text below |
/MIR on the wrong target, noticed when the files are gone | Destructive options in orange, a hint in the list, and a confirmation that says what will be deleted |
| Batch file that reports exit code 1 as an error | Batch and PowerShell output with exit code handling: 0 to 7 success, 8 and above error |
| Scheduled task clicked together in the Task Scheduler UI | Ready Register-ScheduledTask script, or created directly after a confirmation |
| PowerShell | Windows PowerShell 5.1 or PowerShell 7 on Windows (the GUI is WinForms), both verified |
| Modules | None. robocopy.exe is part of every Windows version |
| robocopy | Options as of Windows 11 24H2 and Windows Server 2025. Newer switches such as /COMPRESS, /SPARSE or /IoRate are not available on older Windows versions |
| Rights | Normal user rights for normal copies. /B, /ZB, /COPYALL and owner or auditing information need an elevated GUI, which the title bar shows |
| Language | The user interface and the handbook are German |
Show-sqmRobocopyGui uses the Visual Studio dark theme of the other powershelldba.de tools. Only options you actually set end up in the command; everything else stays at robocopy's default.
/COPY and attribute flags, optional values for /MT, file and folder pickers for /XF, /XD and the log file. Mutually exclusive options deselect each other.
/E /MT:16: the live log lists every file robocopy would copy, the result line explains the exit code.Errors mean robocopy would refuse the call or the combination contradicts itself. Hints flag what is allowed but risky. Double-click on a line jumps to the option. Before a real run the GUI also checks that the source is reachable and the target drive or share exists.
| Area | Examples |
|---|---|
| Paths | Source or target missing, source equals target, wildcards in a directory, source inside the target with /MIR or /PURGE, target inside the source |
| Exclusive groups | /S /E /MIR, /Z /B /ZB, /COPY /SEC /COPYALL /NOCOPY, /MOV /MOVE, the four log variants |
| Values | /MT 1 to 128, /MAX and /MIN in bytes only, /MIN above /MAX, dates for /MAXAGE, /RH time window, allowed letters for /COPY and attribute flags |
| Combinations | /MT with /IPG or /EFSRAW, /TEE without a log file, /XX without /MIR, log file without /NP |
| Risk | /MIR, /PURGE, /MOV, /MOVE delete data, /MIR on a drive or share root, /MON and /MOT never end, /REG changes the defaults, no /R, options that need admin rights |
robocopy D:\Daten\Projekte "\\nas01\backup\Projekte" /MIR /MT:16 /DCOPY:DAT /XF *.tmp Thumbs.db /XD ~snapshot /R:3 /W:5 /LOG:"C:\Logs\projekte.log" /NP
| Format | Use |
|---|---|
| Command line | One line, quotes only where needed, directories without a trailing backslash |
| Batch (.cmd) | chcp 65001 for umlauts in paths, % escaped as %%, exit code 0 to 7 returns 0, 8 and above returns the robocopy error |
| PowerShell | Argument array, & robocopy.exe @robocopyArgs, throws from exit code 8 |
| Scheduled task | Register-ScheduledTask script: once, daily, weekly or interval, as SYSTEM or the current user, catches up missed runs, no parallel instance. Stops with a message if the task exists |
robocopy runs in the background; the window stays responsive and shows the output as it arrives.
/L: robocopy lists what it would copy, delete or skip, and changes nothing./MIR, /PURGE, /MOV or /MOVE it names the folder in which files will be deleted, and "No" is the default button.*EXTRA files that a mirror deletes in orange, errors in red. Progress bar and name of the current file, cancel button./TEE for this run, so the output still appears in the window.| Function | Purpose |
|---|---|
| Show-sqmRobocopyGui | The WinForms GUI, optionally prefilled with -Source, -Destination or an existing -CommandLine |
| New-sqmRobocopyCommand | Command line, batch, PowerShell, scheduled task script or raw argument list from a hashtable |
| Test-sqmRobocopyParameter | Offline rule check, optionally with -CheckPath, returns errors and warnings per option |
| ConvertFrom-sqmRobocopyCommand | Existing command line (cmd, batch, PowerShell) or .RCJ job file back into a hashtable |
| ConvertFrom-sqmRobocopyExitCode | The exit code bit mask as success flag and text |
# Installation - AllUsers when elevated, otherwise CurrentUser Install.cmd # GUI (or double-click Start-sqmRobocopyGui.cmd without installing) Show-sqmRobocopyGui -Source D:\Daten -Destination \\nas01\backup\Daten # Mirror as a nightly scheduled task $p = @{ Source = 'D:\Daten'; Destination = '\\nas01\backup\Daten'; MIR = $true; MT = 16; R = 3; W = 5; LOG = 'C:\Logs\daten.log'; NP = $true } Test-sqmRobocopyParameter -Parameter $p -CheckPath New-sqmRobocopyCommand -Parameter $p -Format ScheduledTask -ScheduleType Daily -ScheduleTime 22:00
The last sources and targets are remembered in %APPDATA%\sqmRobocopyGui\config.json. Tests\Test-sqmRobocopyGui.ps1 lets robocopy parse every option itself, runs all output formats against a folder with spaces, an umlaut and % in its name, and drives the GUI including dry run, real run and cancel.
No dependencies to install: unzip, double-click Start-sqmRobocopyGui.cmd, drag two folders in.
PowerShell source, MIT-licensed. Clone or download the ZIP and run Install.cmd.
GUI walkthrough, input types, presets, every validation rule, output formats, running, scripting. Markdown source also on GitHub.
The same idea for Ola Hallengren's DatabaseBackup: all 75 parameters, validated, as T-SQL or Agent job.
The official documentation of every switch, exit code and remark.
Get in touch about the module, a feature, or the wider powershelldba.de toolchain.