简体   繁体   English

在CMD Shell中时,将文件从主机OS复制到来宾VM会锁定文件(VMware Player / Workstation)

[英]While in CMD shell, copying files from host OS to guest VM locks files (VMware Player/Workstation)

We're running the latest versions of VMWare Player and Workstation for Windows. 我们正在运行Windows的最新版本的VMWare Player和Workstation。 The following behavior is identical across both products. 两种产品的以下行为相同。

Problem: We open a CMD prompt in our guest OS (XP, Vista, Windows 7) and copy files from our host OS using the standard CMD shell copy command: 问题:我们在来宾操作系统(XP,Vista,Windows 7)中打开一个CMD提示符,并使用标准CMD shell复制命令从主机操作系统复制文件:

copy z:\\C$\\testfiles 复制z:\\ C $ \\ testfiles

The copy completes successfully, but from that point forward, all the files that were copied to our guest OS are now LOCKED on our host OS. 复制成功完成,但是从那时起,所有复制到客户机OS的文件现在都锁定在宿主OS上。

This does not happen if we use Windows Explorer to copy files - it only happens when files are copied via the CMD shell. 如果我们使用Windows资源管理器复制文件,则不会发生这种情况-仅在通过CMD Shell复制文件时发生。

As mentioned at the start of this question, this behavior is reproducible in both VMWare Player and VMWare Workstation across multiple machines and multiple guest OS's. 如本问题开头所述,在多台计算机和多个来宾OS的VMWare Player和VMWare Workstation中,此行为都是可重现的。

I've googled for a workaround, but without success. 我已经在Google上寻找解决方法,但没有成功。

Any ideas appreciated. 任何想法表示赞赏。

Malcolm 马尔科姆

Have you tried using Robocopy instead? 您是否尝试过使用Robocopy? It should be on Vista/Windows7 out of the box, and you can download an admin resource toolkit to get it on XP. 它应该开箱即用在Vista / Windows7上,您可以下载管理资源工具包以在XP上获得它。 It has multiple copy modes and hopefully, won't do what the old school 'copy' is doing. 它具有多种复制模式,希望不会做旧式的“复制”操作。

An alternate solution would be to grab a utility called Unlocker , which is capable of releasing file locks in most cases. 另一种解决方案是获取一个名为Unlocker的实用程序,该实用程序在大多数情况下可以释放文件锁。 It's quite handy. 很方便。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM