Repository navigation
Reports and Job Exports
robocopy2rust provides full interoperability with legacy Windows administration artifacts—producing air-gapped audit bundles, bidirectional Microsoft .rcj files, .bat/.ps1 scripts, and schtasks registrations.
Supported formats (ReportFormat): html, json, markdown, or all (writes .html, .json, and .md together; defaults to stem robocopy2rust_report if a directory path is supplied).
-
Zero External Assets: 100% inline CSS and vanilla JavaScript — zero CDNs, zero Google Fonts, zero
<script src=...>, zero network calls on open (safe inside air-gapped OT/server networks). -
Dashboard Cards: Status badge (
SUCCESS/FAILED/CANCELLED), mode badge (DRY-RUN (/L)vsLIVE EXECUTION), Exit Code, Files Copied/Total, Bytes Copied, Failed/Extras, and Throughput. -
Interactive Controls: Built-in Toggle Theme (
light↔body.dark) and live text filter (filterRows()) across the File & Directory Actions table. - XSS-Escaped Output: Every rendered path, job title, error, and log digest is HTML-escaped.
-
Integrity Footer: Displays the raw log's SHA-256 hash (
log_sha256).
-
JSON Envelope (
robocopy2rust.audit.v1): Wrapsschema,generated_at(RFC 3339), and the completeRunResultpayload (args,summary,exit_info,file_actions,errors,log_lines,log_sha256). -
Markdown Audit: Clean GitHub-Flavored Markdown table summaries (
Dirs,Files,Bytesmatrix, exit-code bit descriptions, command block, errors list, and parsed file action table) suitable for tickets or PR logs.
Converts existing Windows Robocopy .log or /UNILOG files into full HTML/JSON/Markdown audit bundles without re-running Robocopy:
- Decodes UTF-8, UTF-8 with BOM, UTF-16LE (
FF FE), and UTF-16BE (FE FF). - Extracts
Source :,Dest :,Options :(detecting/Ldry-run mode), timestamps, all 15FileActionKindaction classes,ERROR <n>lines, and summary counters. - Computes the equivalent bitmask exit code (
0x01copied,0x02extras,0x04mismatch,0x08failed/errors) and SHA-256 log digest.
Microsoft Robocopy uses .rcj files with /SAVE:<name> and /JOB:<name>, often saved by Windows in UTF-16LE with BOM.
-
parse_rcj(bytes):- Automatically decodes UTF-16LE (
FF FE), UTF-16BE (FE FF), UTF-8 BOM (EF BB BF), or plain UTF-8. - Parses
/SD:(Source Directory) and/DD:(Destination Directory) using unquoted values. - Tracks multiline
/IF(Include Files),/XF(Exclude Files), and/XD(Exclude Directories) blocks cleanly. - Strips
:: commentannotations only outside double quotes (clean_rcj_line), so UNC paths or spaces remain intact.
- Automatically decodes UTF-16LE (
-
serialize_rcj(job):- Outputs standard Microsoft-compatible
.rcjfiles with\r\nCRLF endings, header comments,/SD://NOSD,/DD://NODD,/IF, sorted scalar switches,/XF, and normalized/XDsections.
- Outputs standard Microsoft-compatible
Generates an @echo off + setlocal script with proper Robocopy bitmask exit handling (0..=7 → exit /b 0; GEQ 8 → fails with %RC%):
@echo off
setlocal
rem Generated by robocopy2rust - Safe Incremental Backup
echo Starting Robocopy job: Safe Incremental Backup
robocopy "C:\Data Src" D:\Backup /E /MT:8 /XJ /R:3 /W:5 /ETA
set "RC=%ERRORLEVEL%"
echo Robocopy exited with bitmask code %RC%
if %RC% GEQ 8 (
echo [ERROR] Robocopy encountered copy or fatal errors ^(code %RC%^).
exit /b %RC%
)
exit /b 0Avoids fragile string concatenation by emitting an explicit @(...) splatted argument array with single-quote escaping (''):
# Generated by robocopy2rust - Safe Incremental Backup
$ErrorActionPreference = 'Stop'
$robocopyArgs = @(
'C:\Data Src',
'D:\Backup',
'/E',
'/MT:8',
'/XJ',
'/R:3',
'/W:5',
'/ETA'
)
Write-Host 'Starting Robocopy job: Safe Incremental Backup'
& robocopy.exe @robocopyArgs
$rc = $LASTEXITCODE
Write-Host "Robocopy exited with bitmask code $rc"
if ($rc -ge 8) {
Write-Error "Robocopy failed with exit code $rc"
exit $rc
}
exit 0Generates properly quoted schtasks /Create commands supporting cadences:
-
DAILY(/ST HH:MM) -
WEEKLY(/D <days>+/ST HH:MM) -
HOURLY(/ST HH:MM) ONSTARTONLOGON
Appends /RL HIGHEST (when elevated execution is selected) and /F (force overwrite existing task definition).
robocopy2rust (v0.1.0) • GUAP Ecosystem (guap.ca) • Rust 2024 Edition • Apache-2.0 License • Repository • Security Policy