And automatic backup file before deleting files WINDOS .bat

net use \\192.168.0.3 torn /user:torn /persistent:yes
xcopy D:\torn\* \\192.168.0.3\torn /s /e /c /d /h /y
ping -n 10 127.0.0.1>nul
forfiles /p D:\torn /s /m *.* /d -60 /c "cmd /c del @file"
exit

-------------------------------------------------------------------

1, login 172.29.0.3 share files

2, back up data

3, 60 days before deleting data

 

Guess you like

Origin www.cnblogs.com/torn/p/11949020.html