Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1011899 // scpRename - rename file via SCP

JavaX fragment (include)

// allow any host ID and search for pw in JavaX-Secret
static void scpRename(S user, S host, S fromPath, S toPath) ctex {
  final SSHClient client = sshLogin(user, host);
  try {
    print("Renaming on " + user + "@" + host + ": " + fromPath + " -> " + toPath);
    client.newSFTPClient().rename(fromPath, toPath);
  } finally {
    sshDisconnect(client);
  }
}

Author comment

Began life as a copy of #1011852

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011899
Snippet name: scpRename - rename file via SCP
Eternal ID of this version: #1011899/5
Text MD5: 7c78fba6ea18fd66f07195057e55fa42
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-27 22:38:46
Source code size: 372 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 392 / 432
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1011943 - scpMkdir - make directory via SCP