如何在Windows 10上设置默认文件拖放行为

Windows 10 Hero Image

Windows has two default actions when you drag and drop a file or folder into a new destination in File Explorer: copy or move, depending on the target. However, there’s a hidden Registry hack that lets you change the default behavior in Windows 10.

将文件或文件夹拖放到文件资源管理器中的新目标位置时,Windows有两个默认操作:复制或移动,具体取决于目标。 但是,有一个隐藏的注册表黑客,可让您更改Windows 10中的默认行为。

Windows 10的默认行为 (Windows 10’s Default Behavior)

By default, Windows copies anything you drag and drop to a directory on a different drive and moves it if you drag and drop it to another folder on the current drive.

默认情况下,Windows将您拖放的任何内容复制到其他驱动器上的目录,如果将其拖放到当前驱动器上的另一个文件夹,则将其移动。

While you can change the drag-and-drop behavior with a keyboard shortcut, it’s a temporary solution and requires you to press it every time you want to move or copy the items. Here’s how you can force Windows into changing the behavior to either copy or move, regardless of whether you’re dragging items onto the same or different drives.

虽然您可以使用键盘快捷键来更改拖放行为 ,但这是一个临时解决方案,需要您在每次移动或复制项目时都按下它。 不管您是将项目拖动到相同还是不同的驱动器上,都可以通过以下方式迫使Windows改变行为以进行复制或移动。

通过注册表编辑器更改文件或文件夹的拖放行为 (Change File or Folder Drag and Drop Behavior via Registry Editor)

The Registry Editor is a powerful tool. If it’s misused, it can render your system unstable or even inoperable. However, this is a pretty simple hack. As long as you follow the instructions, you shouldn’t have any problems.

注册表编辑器是一个功能强大的工具。 如果使用不当,可能会使您的系统不稳定甚至无法运行。 但是,这是一个非常简单的技巧。 只要您按照说明进行操作,就不会有任何问题。

If you’ve never worked with the Registry Editor before, you might want to read up on it a bit before you get started. Definitely back up the Registry and your computer before you make the following changes.

如果您以前从未使用过注册表编辑器,则可能需要在开始之前对其进行一些阅读 。 在进行以下更改之前, 务必备份注册表计算机

For extra safety, you might want to create a System Restore point before you continue. This way, if something goes wrong, you can just roll back to a time before things went haywire.

为了提高安全性,您可能需要先创建系统还原点,然后再继续。 这样,如果出现问题,您可以回滚到发生麻烦之前的时间。

To change the default behavior, you will need to edit two registry entries. When you’re ready, open the Registry Editor and navigate to the following key in the left sidebar:

若要更改默认行为,您将需要编辑两个注册表项。 准备就绪后, 打开注册表编辑器并导航到左侧栏中的以下键:

HKEY_CLASSES_ROOT\*

Once here, right-click the “*” folder and choose New > DWORD (32-bit) Value. Name the value DefaultDropEffect .

在此处后,右键单击“ *”文件夹,然后选择“新建”>“ DWORD(32位)值”。 将值命名为DefaultDropEffect

Right-click the key and choose New > DWORD (32-bit) Value. Name the DWORD DefaultDropBehavior.

Now, you’re going to modify that value to either always copy or always move files and folders as the default drop behavior. There are four values you can use that have different effects. While we’re only interested in two of the actions, they are as follows:

现在,您将修改该值,以始终复制或始终移动文件和文件夹作为默认放置行为。 您可以使用四个具有不同效果的值。 尽管我们仅对其中两个操作感兴趣,但它们如下:

  • Default action (0): Let Windows decide whether to copy or move files and folders when you drag and drop it into place.

    默认操作(0):让Windows决定将其拖放到位时是复制还是移动文件和文件夹。

  • Always copy (1): A copy of the file or folder will always be placed in the destination.

    始终复制(1):始终将文件或文件夹的副本放置在目标位置。

  • Always move (2): The file or folder will move to the destination.

    始终移动(2):文件或文件夹将移动到目标位置。

  • Always create a shortcut (4): A link to the original file or folder will always be placed in the destination.

    始终创建快捷方式(4):始终将到原始文件或文件夹的链接放置在目标位置。

Double-click the new DefaultDropEffect value to open the edit window and enter either a “1” or “2”, depending on whether you always want to copy or move files or folders. For this example, we will use “1” to always copy files or folders. When done, hit “OK.”

双击新的DefaultDropEffect值以打开编辑窗口,然后输入“ 1”或“ 2”,这取决于您是否始终要复制或移动文件或文件夹。 对于此示例,我们将使用“ 1”始终复制文件或文件夹。 完成后,点击“确定”。

Set the Value Data box to "1" and click "OK."

Next, navigate to the second key and repeat the steps from above; create a new DWORD (32-bit) Value, name it DefaultDropEffect, and set the value to “1.”

接下来,导航至第二个键并重复以上步骤; 创建一个新的DWORD(32位)值,将其命名为DefaultDropEffect,并将该值设置为“ 1”。

Use the left sidebar to navigate to the following key (or copy and paste it into the Registry Editor address bar):

使用左侧边栏导航至以下键(或将其复制并粘贴到注册表编辑器地址栏中):

HKEY_CLASSES_ROOT\AllFilesystemObjects

Right-click the “AllFilesystemObjects” folder and choose New > DWORD (32-bit) Value. Name the new DWORD DefaultDropEffect.

右键单击“ AllFilesystemObjects”文件夹,然后选择“新建”>“ DWORD(32位)值”。 将新的DWORD命名为DefaultDropEffect

Right-click the key and choose New > DWORD (32-bit) Value. Name the DWORD DefaultDropBehavior.

Now, double-click the new DefaultDropEffect value, set the “Value data” box to “1”, and then click “OK” to close the window.

现在,双击新的DefaultDropEffect值,将“值数据”框设置为“ 1”,然后单击“确定”关闭窗口。

Set the Value Data box to "1" and click "OK."

You can now close the Registry Editor and the changes will take effect immediately, no need to restart your computer.

现在,您可以关闭注册表编辑器,并且更改将立即生效,无需重新启动计算机。

下载我们的一键式注册表黑客 (Download Our One-Click Registry Hack)

Drag and drop registry hacks for Windows 10

If you don’t feel like diving into the Registry yourself, we’ve created a registry hack you can use. Just download and extract the following ZIP file:

如果您不想自己进入注册表,我们已经创建了一个可以使用的注册表黑客。 只需下载并解压缩以下ZIP文件:

Download Change Default Drag and Drop Behavior Hacks

下载更改默认拖放行为技巧

Inside you’ll find a REG file for changing the default drag and drop behavior to either always copy or move by setting the value of DefaultDropEffect in both keys to either “1” or “2”. Once it’s extracted, double-click the file that matches your desired behavior and accept the prompts asking whether you’re sure you want to make changes to your Registry.

在内部,您将找到一个REG文件 ,可通过将两个键中的DefaultDropEffect值都设置为“ 1”或“ 2”来将默认拖放行为更改为始终复制或移动。 解压缩后,双击与所需行为匹配的文件并接受提示,询问您是否确定要对注册表进行更改。

You’ll also find a REG file for changing drag and drop behavior back to the default.

您还将找到一个REG文件,用于将拖放行为更改回默认值。

This hack just adds the DefaultDropEffect values to the * and AllFilesystemObjects keys we talked about in the previous section and then exported to a .REG file. Running the hack modifies the values in your Registry for you. And if you enjoy fiddling with the Registry, it’s worth taking the time to learn how to make your own Registry hacks.

该hack只是将DefaultDropEffect值添加到上一节中讨论的*和AllFilesystemObjects项中,然后导出到.REG文件。 运行黑客程序会为您修改注册表中的值。 而且,如果您喜欢使用注册表,则值得花时间学习如何制作自己的注册表黑客

翻译自: https://www.howtogeek.com/677102/how-to-set-default-file-drag-and-drop-behavior-on-windows-10/

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值