Robocopy, or “Robust File Copy,” is a powerful command-line tool in Windows for copying files and directories. One of its standout features is its logging capabilities, which allow you to track file transfers with precision. In this guide, we’ll explore how to use the /LOG and /TEE options in Robocopy to monitor and record your file transfer operations effectively.

What is Robocopy Logging?
Robocopy’s logging features let you create detailed records of file transfer activities. Whether you’re backing up critical data, migrating files to a new server, or syncing directories, logging helps you verify what was copied, skipped, or failed. The two primary logging options are /LOG and /TEE, and they serve distinct purposes.
Why Use Robocopy Logging?
- Track Progress: Monitor which files are copied, skipped, or encounter errors.
- Troubleshooting: Identify issues during file transfers for quick resolution.
- Auditing: Maintain records for compliance or documentation purposes.
- Automation: Use logs to verify automated scripts or scheduled tasks.
Understanding /LOG: Saving Output to a File
The /LOG option redirects Robocopy’s output to a specified file, creating a detailed record of the operation. This is ideal for scenarios where you need a permanent log for review or auditing.
Syntax for /LOG
robocopy <source> <destination> /LOG:<filename>
<source>: The path to the source directory.<destination>: The path to the destination directory.<filename>: The name of the log file (e.g.,backup.log).
Example of /LOG
Suppose you’re copying files from C:\Data to D:\Backup. To log the operation, run:
robocopy C:\Data D:\Backup /LOG:C:\Logs\backup.log
This command creates a file named backup.log in C:\Logs, capturing details like copied files, skipped files, and any errors.
Key Points About /LOG
- Overwrites Existing Logs: By default,
/LOGoverwrites the specified log file. Use/LOG+:<filename>to append instead. - Detailed Output: Includes timestamps, file sizes, and transfer status.
- No Console Output: Using
/LOGsuppresses output to the command prompt. Combine with/TEEfor both file and console output (more on this below).
Using /TEE: Console and Log Output Simultaneously
The /TEE option is used in conjunction with /LOG to display Robocopy’s output in the command prompt and save it to a log file. Think of it as a “tee” in piping, splitting the output to two destinations.
Syntax for /TEE
robocopy <source> <destination> /LOG:<filename> /TEE
Example of /TEE
To copy files from C:\Data to D:\Backup, log the operation, and see the output in real-time, use:
robocopy C:\Data D:\Backup /LOG:C:\Logs\backup.log /TEE
This command writes the log to backup.log while also displaying the progress in the command prompt.
Benefits of /TEE
- Real-Time Monitoring: Watch the transfer process live while still saving a log.
- Debugging: Spot issues immediately without waiting for the log file.
- Flexibility: Combines the benefits of console feedback and file logging.
Best Practices for Robocopy Logging
- Choose Descriptive Log File Names: Include dates or task names (e.g.,
backup_2025-07-29.log) for easy identification. - Use /LOG+ for Append Operations: If running multiple Robocopy commands, append to the same log file to avoid overwriting.
- Combine with /V for Verbose Output: The
/Voption adds more details to logs, such as skipped files and their reasons. - Test Your Commands: Run Robocopy with
/L(list-only mode) to simulate and review the log without copying files. - Monitor Log File Size: Large operations can create massive logs. Ensure sufficient disk space and consider splitting logs if needed.
Example with Additional Options
For a verbose log with both console and file output, try:
robocopy C:\Data D:\Backup /LOG+:C:\Logs\backup_2025-07-29.log /TEE /V
This command appends to the log, shows verbose details, and displays output in the console.
Common Logging Issues and Fixes
- Log File Locked: If the log file is in use, Robocopy may fail. Ensure no other process is accessing the log file.
- No Output in Console: If you use
/LOGwithout/TEE, console output is suppressed. Add/TEEfor dual output. - Large Log Files: For massive transfers, logs can grow unwieldy. Use
/NP(no progress) to reduce log size by omitting progress percentages.
When to Use /LOG vs. /TEE
- Use
/LOGalone when you only need a file record and don’t require real-time console feedback (e.g., automated scripts). - Use
/TEEwith/LOGwhen you want to monitor transfers live while keeping a log (e.g., manual operations or debugging).
Conclusion
Robocopy’s /LOG and /TEE options make it easy to track file transfers with precision. Whether you’re automating backups or performing one-off migrations, these tools provide the visibility you need to ensure success. By combining /LOG for file records and /TEE for real-time monitoring, you can tailor Robocopy’s logging to your specific needs. Start experimenting with these options in your next file transfer task to streamline your workflow and keep your data operations transparent.
For more Robocopy tips and tricks, check out Microsoft’s official documentation or explore advanced options like /MIR for mirroring directories.
Author is a passionate Blogger and Writer at Dlightdaily . Dlightdaily produces self researched quality and well explained content regarding HowToGuide, Technology and Management Tips&Tricks.