Redirecting output or sending output to a file is a simple process. PowerShell also allows us to add, remove, or replace content in the files using the other three Content cmdlets (Get-Command *content or Get-Command -Noun Content). So, here is the scenario for the recipe.
You sent some text to the message.txt file, in the last recipe. Change the text to Successfully sent the contents of ~/random/dir-03 and appending the list to file-list.txt. Then, add the date to the message.txt and file-list.txt files. Finally, empty the error.txt file.