I’m getting back into scripting for rClone after a couple months away. I had written a few scripts that used ‘Tee-Object’ in Windows PowerShell and they worked without fault.
Recently, I can’t seem to get ‘Tee-Object’ to work anymore when using ‘rclone copy’. After a successful transfer, I can see the stats in the PowerShell window, but nothing was sent to my log file. I’ve tried using ‘Tee-Object’ after a quick ‘rclone ls’ and it logs the information just fine.
This command sends nothing to the log output:
> rclone copy “M:\Testing\rClone Test” testing: -v | Tee-Object -FilePath “F:\Logs\Test\testLog.log”
This command sends everything to the log output:
> rclone ls testing: | Tee-Object -FilePath “F:\Logs\Test\testLog.log”
Does anyone have any ideas as to why rclone copy isn’t working with Tee-Object?
2>&1 works in PowerShell, but then I don’t get any of the logging stats in the actual PowerShell window. I was hoping to both see the progress in PowerShell, but Tee-Object into a log file.
I don’t quite know why Tee-Object would work when doing an ‘rclone ls’ but not work specifically when doing an ‘rclone copy’.