我在ssh客户端中使用/home/xxx/
命令将一些文件上传到我的远程应用服务器A.如果我登录远程服务器A并且当前位于路径rz
中。我想将文件上传到路径'/home/xxx/work'.So for Sub test()
Dim cell As Excel.Range
Dim wsWithSheetNames As Excel.Worksheet
Dim wbToAddSheetsTo As Excel.Workbook
Set wsWithSheetNames = ActiveSheet
Set wbToAddSheetsTo = ActiveWorkbook
For wsname = 1 To 254
For Each cell In wsWithSheetNames.Range("A" & wsname)
With wbToAddSheetsTo
.Sheets.Add After:=.Sheets(.Sheets.Count)
On Error Resume Next
ActiveSheet.Name = cell.Value
wsname2 = cell.Value
If Err.Number = 1004 Then
Debug.Print cell.Value & " already used as a sheet name"
End If
On Error GoTo 0
End With
Next cell
Worksheets("Sheet1").Range("B1", "B1735").Copy
Worksheets(wsname2).Range("A2")
(HERE IS THE PROBLEM!)Worksheets(wsname2).Range("B2:AGR1736").FormulaLocal =
"=IFERROR(VLOOKUP($A2,OFFSET([final.xlsb]" & CHr(34) & wsname2 & Chr(34) & "!$A$1:$D$2000,0,
(COLUMN(A2)*4-4)),4,0),"")"
Next wsname
End Sub
命令,是否有一个命令参数来指定A是上传文件的路径?
答案 0 :(得分:0)
在远程端使用复合命令:
ssh foo@bar "cd work && rz ..."