Problem with IGuestSession copyTo

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
sadim
Posts: 4
Joined: 9. Aug 2014, 21:11

Problem with IGuestSession copyTo

Post by sadim »

I use the Main API with Python and have a problem to copy a file to the guest system.

This is the code:

Code: Select all

progress = guestSession.copyTo(r"F:\dummy.txt", r"C:\temp",[])
progress.waitForCompletion(-1)
I can create directories or remove some files, so the guestSession isn't the problem. I get no error message.
The function progress.description returns the following message

Copying "F:\dummy.txt" from host to "C:\temp" on the guest

But the dummy.txt is not copied. I tried it with smaller files, different source and destination folders.

Has anyone any idea what's the problem?
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Problem with IGuestSession copyTo

Post by noteirak »

Could you try with including the full destination path in the command, like this :

Code: Select all

progress = guestSession.copyTo(r"F:\dummy.txt", r"C:\temp\dummy.txt",[])
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
hoverflow
Posts: 4
Joined: 24. Feb 2015, 02:37

Re: Problem with IGuestSession copyTo

Post by hoverflow »

Yes, noteirak is right, you must use full path.
Post Reply