Get-ChildItem -path C:\ORIGINAL_TEXT_FILES_FOLDER\n -recurse |?{ ! $_.PSIsContainer } |?{($_.name).contains(".txt")} | %{ Out-File -filepath C:\NEW_TEXT_FILE_PATH\CONSOLIDATED.txt -inputobject ($_.name + "|" + (get-content $_.fullname) + "`n" ) -Append}
No comments:
Post a Comment