Untitled


SUBMITTED BY: Guest

DATE: Aug. 19, 2024, 12:54 p.m.

FORMAT: Text only

SIZE: 789 Bytes

HITS: 157

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

comments powered by Disqus