$ErrorActionPreference = "Stop" $target = "C:\cryptosample" Write-Host "Generating default EFS sample files" -ForegroundColor Cyan Write-Host "Target folder: $target" New-Item -ItemType Directory -Force -Path $target | Out-Null New-Item -ItemType Directory -Force -Path (Join-Path $target "docs") | Out-Null New-Item -ItemType Directory -Force -Path (Join-Path $target "nested\level1") | Out-Null New-Item -ItemType Directory -Force -Path (Join-Path $target "binary") | Out-Null $stamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss K" Set-Content -Path (Join-Path $target "readme-sample.txt") -Value @( "EFS sample file set", "Generated: $stamp", "Computer: $env:COMPUTERNAME", "User: $env:USERNAME", "Purpose: controlled EFS validation under C:\cryptosample only" ) -Encoding UTF8 Set-Content -Path (Join-Path $target "docs\sample-notes.txt") -Value @( "This is a disposable plaintext document.", "After the EFS tool runs, cipher /C should show this file as encrypted." ) -Encoding UTF8 Set-Content -Path (Join-Path $target "nested\level1\nested-file.txt") -Value "Nested disposable EFS validation file generated at $stamp" -Encoding UTF8 Set-Content -Path (Join-Path $target "csv-sample.csv") -Value @( "id,name,purpose", "1,alpha,EFS validation", "2,beta,backup validation", "3,gamma,recovery validation" ) -Encoding UTF8 $bytes = New-Object byte[] 4096 [System.Security.Cryptography.RandomNumberGenerator]::Fill($bytes) [System.IO.File]::WriteAllBytes((Join-Path $target "binary\random-4kb.bin"), $bytes) Write-Host "Done. Created disposable sample files under $target" -ForegroundColor Green Write-Host "Next: run the EFS controlled runner from the Railway /download page."