6

I wonder if it's possible to make file transfers through VNC using only the command line. This question illustrates how to copy text from one window to another, but I haven't found a way to move files using the command line.

In my case, I need to move a batch file from the client to the server and run it.

Sebi
  • 1,134
  • 4
  • 19
  • 29
  • VNC isn’t suitable for that. Why not use a proper file transfer protocol? – Daniel B Mar 14 '16 at 18:54
  • I have no control over the remote machine which is only reachable through VNC. – Sebi Mar 14 '16 at 18:57
  • 1
    You’re out of luck then, because VNC offers no standardized file transfer mechanism. There are only vendor-specific implementations, so you’ll have to provide more details on the operating systems involved as well as the VNC server and client software. – Daniel B Mar 14 '16 at 18:59
  • The remote machine is running windows 7, the host debian and both are using openvnc. – Sebi Mar 14 '16 at 19:01
  • There’s no such thing as “openvnc”. Please provide a link to the homepage. – Daniel B Mar 14 '16 at 19:17
  • Sorry, I meant tiger vnc – Sebi Mar 14 '16 at 19:19

2 Answers2

6
  1. TightVNC offers file transfer. What flavor of VNC server is installed on the remote host?
  2. Using clipboard copy and paste, open a remote file, save it as a .cmd file, and then copy/paste the contents of the batch file from the local machine to the remote. Then save the remote file.
Bob
  • 351
  • 1
  • 5
3

VNC doesn't do file transfer, at least consistently. You need something else for file transfer.

If both hosts were using Linux, or the remote Linux and the local Windows, I'd suggest SCP. But since the remote machine is running Windows, I suggest installing an FTP server. If it's over the Internet and/or the data is sensitive, use something more secure like SFTP. A good server is FileZilla. For the client, you can use the ftp command.

Dessa Simpson
  • 1,697
  • 1
  • 15
  • 27