现在要将一台远程windows机器的备份文件每天定时copy到本地windows 2003机器,并且删除过期的文件,然后放到任务计划中自动执行。
CMD批处理脚本如下:
REM Start copy all bak files from remote machine,
REM Then,remove the files beyond 3 days.
copy /Y //192.168.0.75/g$/DB_backup/CVSHelper/*.bak .
forfiles /m *.bak /d -3 /c "cmd /c del @file /f"
REM End
[@more@] Reference: http://hi.baidu.com/runwa/blog/item/ac50db1f4ddaebffe1fe0bd8.html
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12472709/viewspace-1036185/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12472709/viewspace-1036185/
548

被折叠的 条评论
为什么被折叠?



