Skip to content

Instantly share code, notes, and snippets.

@epjuan21
Created February 23, 2023 22:15
Show Gist options
  • Save epjuan21/8a22d79ad1691400e7ad3c1e63f4959c to your computer and use it in GitHub Desktop.
Save epjuan21/8a22d79ad1691400e7ad3c1e63f4959c to your computer and use it in GitHub Desktop.
Join Text Files
# Permitir Ejecución de Scripts en PowerShell
Set-ExecutionPolicy RemoteSigned
# Unir Todos los Archivos RIPS en un solo archivo de cada tipo
Get-Content -Path "D:\SSIS\ImportRIPS\AC\*.txt" | Set-Content -Path "D:\SSIS\ImportRIPS\Archive\AC.txt"
Get-Content -Path "D:\SSIS\ImportRIPS\AF\*.txt" | Set-Content -Path "D:\SSIS\ImportRIPS\Archive\AF.txt"
Get-Content -Path "D:\SSIS\ImportRIPS\AH\*.txt" | Set-Content -Path "D:\SSIS\ImportRIPS\Archive\AH.txt"
Get-Content -Path "D:\SSIS\ImportRIPS\AM\*.txt" | Set-Content -Path "D:\SSIS\ImportRIPS\Archive\AM.txt"
Get-Content -Path "D:\SSIS\ImportRIPS\AN\*.txt" | Set-Content -Path "D:\SSIS\ImportRIPS\Archive\AN.txt"
Get-Content -Path "D:\SSIS\ImportRIPS\AP\*.txt" | Set-Content -Path "D:\SSIS\ImportRIPS\Archive\AP.txt"
Get-Content -Path "D:\SSIS\ImportRIPS\AT\*.txt" | Set-Content -Path "D:\SSIS\ImportRIPS\Archive\AT.txt"
Get-Content -Path "D:\SSIS\ImportRIPS\AU\*.txt" | Set-Content -Path "D:\SSIS\ImportRIPS\Archive\AU.txt"
Get-Content -Path "D:\SSIS\ImportRIPS\CT\*.txt" | Set-Content -Path "D:\SSIS\ImportRIPS\Archive\CT.txt"
Get-Content -Path "D:\SSIS\ImportRIPS\US\*.txt" | Set-Content -Path "D:\SSIS\ImportRIPS\Archive\US.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment