iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
💾

Backing up Windows files with Robocopy

に公開

This assumes backing up a shared folder on a network to a local external HDD.

PowerShell Commands

net use \\192.168.xxx.xxx /delete
net use \\192.168.xxx.xxx /user:"user" "pass"

$GetDate = Get-Date -Format "yyyyMMdd"

robocopy "\\192.168.xxx.xxx\folder" "D:\backup" /LOG+:"D:\log\backup-log_"$GetDate".log" /s /e /XD "trashbox" /XF *.tmp /TEE /NP /R:3 /W:60

net use \\192.168.xxx.xxx /delete

The advantage of using robocopy is that it only copies changed files and allows for advanced settings such as retries.

I have summarized the knowledge gained from two and a half years of daily home development! Please take a look if you are interested.

https://doityourself.jp/articles/2026/full-platform-development/

Discussion