2013-06-09

Windows Powershell - How to combine multiple text files into one (recursive folder lookup)

Get-ChildItem -path C:\ORIGINAL_TEXT_FILES_IN_THIS_FOLDER\n -recurse |?{ ! $_.PSIsContainer } |?{($_.name).contains(".txt")} | %{ Out-File -filepath C:\NEW_CONSOLIDATED_FILE.txt -inputobject (get-content $_.fullname) -Append}

No comments:

Post a Comment