# Directory containing the chunk files $chunksDirectory = "C:\path\to\output" # Get list of chunk files sorted by name $chunkFiles = Get-ChildItem -Path $chunksDirectory -Filter "Chunk_*.txt" | Sort-Object Name # Iterate through each chunk file foreach ($chunkFile in $chunkFiles) { # Copy the content of the chunk file to the clipboard $filePath = $chunkFile.FullName $fileContent = Get-Content $filePath -Raw $fileContent | Set-Clipboard # Prompt the user to move to the next chunk Write-Host "Chunk '$($chunkFile.Name)' copied to clipboard. Press Enter to move to next chunk file, or type 'exit' to stop." $userInput = Read-Host if ($userInput -eq 'exit') { break } } Write-Host "Process completed or exited by user."