[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
本帖最后由 coolee2020 于 2019-12-18 15:32 编辑
  1. @rem 获取当前的日期以及格式化的日期
  2. @set Lday=%date:~0,4%%date:~5,2%%date:~8,2%
  3. @set sday=%date:~8,2%
  4. @set LastDay1=%date:~0,4%%date:~5,2%01
  5. @set LastDay2=%date:~0,4%%date:~5,2%15
  6. @rem 1号和15号执行第一步
  7. @if %sday%==1 goto yesdo
  8. @if %sday%==15 goto yesdo
  9. goto nodo
  10. :yesdo
  11. rsync -vzrtopg --port 28950 --progress /cygdrive/f/codefile 172.16.0.12::BPMDEVServercodefile/%Lday%
  12. @exit
  13. :nodo
  14. @rem 16-31号执行nextdo1
  15. @if %sday% GTR 15 goto nextdo1
  16. @rem 16-31号执行nextdo2
  17. @if %sday% LSS 15 goto nextdo2
  18. :nextdo1
  19. rsync -vzrtopgu --port 28950 --progress /cygdrive/f/codefile 172.16.0.12::BPMDEVServercodefile/%LastDay2%/increment/%Lday%
  20. @exit
  21. :nextdo2
  22. rsync -vzrtopgu --port 28950 --progress /cygdrive/f/codefile 172.16.0.12::BPMDEVServercodefile/%LastDay1%/increment/%Lday%
  23. @exit
复制代码

TOP

返回列表