# Skript pro PowerShell, by ChatGPT $RootPath = "C:\" $OutputCsv = "C:\filehashes.csv" $Algorithm = "SHA256" $SkipGreaterThan = 50MB # bajty (např. 1 MB) # hlavička CSV "Path,Hash" | Out-File -FilePath $OutputCsv -Encoding UTF8 Get-ChildItem -Path $RootPath -Recurse -File -ErrorAction SilentlyContinue | Where-Object { $_.Length -le $SkipGreaterThan } | ForEach-Object { $hash = "N/A" try { $hash = (Get-FileHash -Path $_.FullName -Algorithm $Algorithm -ErrorAction Stop).Hash } catch { # zůstane N/A } $path = $_.FullName -replace '"','""' "`"$path`",$hash" | Add-Content -Path $OutputCsv -Encoding UTF8 }