Opened 5 years ago
Last modified 5 years ago
#19256 new defect
VBoxManage copyfrom --target-directory fails to copy
Reported by: | robpats | Owned by: | |
---|---|---|---|
Component: | guest control | Version: | VirtualBox 5.2.36 |
Keywords: | Cc: | ||
Guest type: | Windows | Host type: | Windows |
Description
"copyfrom --target-directory" fails on Windows 7 host with Windows XP/Windows 7 guests in VirtualBox 5.2.34 and 5.2.36. The fix of #18724 seems to break this.
>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" guestcontrol vm_win7 copyfrom -v --username User --password 123 --target-directory D:\log C:\Users\User\Desktop\1.txt Creating guest session as user 'User'... Waiting for guest session to start... Successfully started guest session (ID 1) Copying from guest to host ... Directory "D:\log\" already exists Source: C:\Users\User\Desktop\1.txt Copying "C:\Users\User\Desktop\1.txt" to "D:\log\" ... 0%... Progress state: VBOX_E_IPRT_ERROR VBoxManage.exe: error: Opening/creating destination file on host "D:\log\" failed: VERR_PATH_NOT_FOUND. VBoxManage.exe: error: Error processing "C:\Users\User\Desktop\1.txt", rc=VERR_GENERAL_FAILURE Closing guest session ...
When I try without --target-directory,
copyfrom [common-options] [--dryrun] [--follow] [-R|--recursive] <guest-src0> [guest-src1 [...]] <host-dst>
<host-dst> is written from start but not replaced. This corrupts <host-dst> if a smaller file is copied.
Note:
See TracTickets
for help on using tickets.
On a Linux host the copyfrom command has a very similar behavior to its pre-5.2.34 self. You have to specify a filename in the --target-directory parameter. It's also how copyto used to work before the fix.
However, now when you specify the full filename it will append a backslash "\" to the end of the filename on anything you copy out. So if you copy 'c:\users\user\Desktop\1.txt" to "/tmp/1.txt" it will write the file "/tmp/1.txt\". Unfortunately I have not been able to make it treat the --target-directory parameter as a directory.