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.

  • 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
  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.
  • I cannot use the clipboard copy paste option. The client runs on debian and the server on windows. – Sebi Mar 14 '16 at 20:51
  • @sebi you can run the commnad : vncconfig – Uday Chauhan Oct 29 '20 at 8:00

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.

  • But is it possible to run the commands in the batch file in sequence as the appear in the file through VNC so that file transfer is not necessary? – Sebi Mar 14 '16 at 19:15
  • 1
    As far as I know, command-line VNC is impossible. – Duncan X Simpson Mar 14 '16 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.