Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Robocopy and powershell logfiles

$
0
0

Hi,

I am using a powershell script that contains also some robocopy statements.

Powershell writes a logfile:   "log-statements" | out-File -Append Logfile.txt

I tried robocopy to use the same logfile: /Log+:Logfile.txt, but Robocopy will destroy the format of the powershell logfile. The powershell script write a plain text file. When robocopy write into the same logfile, the robocopy log contains only special characters and then also the powershell log contains special characters. When both scripts use the seperate logfiles everything is ok.

Is there an easy way that powershell and robocopy can write - one after another - to the same txt-logfile?

sonny


Siegmund Sonntag


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>