@echo off set src_dir=\\127.0.0.1\XXXX\XXXX\%date:~5,2%%date:~8,2% rem 由于本机已经挂载了,所以不需要使用账号和密码登录 rem net use %src_dir% /user:ws 123456 net use %src_dir% rem 拷贝文件 XCOPY /E /R /Y /D "\\127.0.0.1\XXXX\XXXX\%date:~5,2%%date:~8,2%\*.*" "E:\Desktop\%date:~5,2%%date:~8,2%\" ECHO [复制成功,5秒自动关闭...] ping -n 1 127.0.0.1>nul Exit