1234567891011121314 |
- # 切换到脚本目录
- # 获取脚本所在目录的绝对路径
- $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
- # 切换到项目根目录
- Set-Location (Split-Path -Parent (Split-Path -Parent $scriptPath))
- # 使用 scp 命令复制,排除 vendor 目录
- $sourceDir = "D:\work\xiaoding\owl-admin"
- $targetDir = "root@192.168.110.85:/www/wwwroot/xiaoding"
- # 执行 scp 命令,使用正确的语法
- scp -r $sourceDir/* $targetDir
|