安装pscp

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

cmd脚本

@echo off
rem 拷贝的文件名称
set name=zhong-auth.jar
rem 拷贝文件的目录
set folder=E:\git\zhong\zhong-auth\target\
rem 当前目录
set current=E:\copysh\
if exist %current%%name% del %current%%name%

xcopy %folder%%name% %current%

pscp -pw 123456 %current%%name% root@192.168.1.107:/home/

@cmd.exe
exist

新建一个目录,放这个脚本

命令是把当前目录的jar包删除,然后拷贝最新编译后的jar包到当前目录,然后登录linux传输上去

如果要传输完成后直接关闭窗口,就把最后两行删掉,改为exit

相关文章:

  • 2021-10-10
  • 2021-08-31
  • 2021-11-06
  • 2022-02-27
  • 2022-12-23
  • 2021-08-15
猜你喜欢
  • 2021-06-16
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-12-05
  • 2021-11-06
  • 2022-01-29
相关资源
相似解决方案