Here’s a little Powershell tip that can be useful. If you have a directory with text files and want to add the content to a single text file, you can use this command in Powershell to read all text files in a folder.
Get-Content "directory path"\*.txt -Force
To add to this command, you can also add the content from the text files to a new text file using the below command:
Get-Content "directory path"\*.txt -Force | Set-Content "directory path"\results.txt
- Powershell script to create a menu in Powershell
- Powershell script to copy a file to a new directory
- How to check if Powershell is running as an administrator
- How to use Powershell to bulk add users to groups in Active Directory
- Powershell UNC path browsing using PSDrives
- How to export an RSOP report using Powershell
Subscribe to newsletter:
If you want to receive the latest news for MEMCM, Windows 10, and Powershell, please subscribe to my monthly newsletter!