VirtualBox

Ticket #10680 (closed defect: worksforme)

Opened 23 months ago

Last modified 18 months ago

VBoxManage guestcontrol copyto: Wildcarding doesn't work

Reported by: Studley Owned by:
Priority: major Component: guest control
Version: VirtualBox 4.1.16 Keywords: copyto
Cc: Guest type: other
Host type: other

Description

According to the documentation for VBoxManage, The 'copyto' subcommand of guestcontrol should allow wildcards to be specified when copying from a source.

However, when I attempt this, I get an unexpected error ("source does not exist"). If I replace the wildcard with the path to an individual file, the file copies correctly.

In my example, I have a folder full of JAR files:

VBoxManage guestcontrol "myVMname" copyto C:\build\*.jar /home/test/Downloads/ --username test --password test --verbose

Copying from host to guest ... Directory "/home/test/Downloads/" already exists Source: C:\build VBoxManage.exe: error: Warning: Source "C:\build" does not exist, skipping!

VBoxManage guestcontrol "myVMname" copyto C:\build\install.jar /home/test/Downloads/ --username test --password test --verbose

Copying from host to guest ... Directory "home/test/Downloads" already exists Source: C:\build\install.jar Copying "C:\build\install.jar" to "/home/test/Downloads/install.jar" ... 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

In my two commands, the only difference is that the first contains a wildcard (which the documentation says is valid syntax). Wildcarding is essential in my scenario as I don't necessarily know how many JAR files there will be - I just want to copy all of them.

The problem seems to be on the host-side rather than the guest, but if it's relevant, my host is Windows 7 Professional SP1, and my guest is Oracle Linux 6.

Change History

comment:1 Changed 22 months ago by frank

Which host is that? And from your description it seems that you are using a Windows guest, is that correct?

If your host is Linux then remember to properly quote the wildcard, otherwise the host shell will evaluate it.

comment:2 Changed 22 months ago by Studley

Host = Windows 7 Professional SP1

Guest = Oracle Linux 6

That said, your comment made me re-evaluate whether I needed to escape the wildcard. Sure enough, the following command runs successfully (note extra backslash):

VBoxManage guestcontrol "myVMname" copyto C:\build\\*.jar /home/test/Downloads/ --username test --password test --verbose 

Therefore it seems this can be closed as invalid (user error)

comment:3 Changed 18 months ago by frank

  • Status changed from new to closed
  • Resolution set to worksforme
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use