使用Network Recycle Bin启用映射网络驱动器上的回收站

2023-05-16

前言

在内网环境中我们经常会使用NAS或者Samba在Windows中映射网络驱动器,方便局域网用户实时共享交换数据。但当存储在网络或映射网络上的任何文件被删除时,该文件将被永久删除。它不会去到本地计算机回收站,也不会去到服务器的回收站,我通过google在mydigitallife和microsoft technet中搜索到很多方法,但针对不同操作系统且涉及到域用户管理的复杂情况下,单纯的依赖注册表修改可能已经支撑不住需求的膨胀了。在所有的方法中使用Network Recycle Bin可以轻松解决映射网络驱动器上的回收站。

使用Network Recycle Bin为局域网巧设“回收站”

更新历史

2018年04月20日 - 初稿

阅读原文 - https://wsgzao.github.io/post...

扩展阅读

Network Recycle Bin Tool - http://www.networkrecyclebin....


如何启用映射网络驱动器上的回收站

映射驱动器不过是将本地驱动器连接到另一台计算机上特别分配的共享目录或文件夹。 一旦驱动器被映射,您就可以访问共享资源,您可以像对待您的系统本地一样对待它。可以将多个计算机驱动器映射到共享资源,并利用此网络空间。

当存储在网络或映射网络上的任何文件被删除时,该文件将被永久删除。 它不会去到本地计算机回收站,也不会去到服务器的回收站。 为了避免将来出现这种数据丢失情况,您可以在映射的网络驱动器上启用回收站。 按照以下给出的步骤在映射的网络驱动器上启用回收站.

  1. 将网络驱动器映射到要使用的网络共享。 确保登录后重新连接驱动器
  2. 然后进入C:> 用户 > 用户名
  3. 右键单击该位置的任何文件夹,然后单击 属性 > 位置选项卡
  4. 单击移动并浏览根驱动器(在步骤1中映射),然后点击选择文件夹
  5. 然后点击 好 并当对话框出现命中 是
  6. 只需在PC上为每个用户重复这些步骤

注意:要验证此过程是否正常工作,请右键单击回收站并转至属性,并检查网络驱动器是否在回收站的位置列中列出。


需要注意的事情

这仅适用于通过映射的网络驱动器而不是UNC路径访问的文件。 我们举一个例子:如果你已经将\servershare映射到E:并从这个E:驱动器中删除了一些东西,那么它将会进入回收站。 但是,如果您浏览到\servershare并擦除文件,它将被永久删除。

Enable Recycle Bin on mapped network drives

方案1,通过重定向文件位置的方式我自己在Windows 10下测试可用,但Windows 7失败了

https://forums.mydigitallife....

You may have noticed that when you delete a file stored on a network location or mapped network drive that the file is permanently deleted. It does not go to the local computer's recycle bin and does not go to the server's recycle bin. I have discovered a work-around that extends recycle bin coverage to include mapped network drives. The solution is not 100% perfect, but works extremely well and does not rely on Shadow Copies or 3rd-party software.

Here's how:

  1. Map a network drive to the network share you want to use. Make sure that the drive is re-connected on logon. If you don't know how to do this, search Google.
  2. Browse to C:users<user name>.
  3. Right-click on one of the folders in this location (I chose saved games) and click properties.
  4. Select the Location tab.
  5. Click Move, browse to to root of the drive you mapped in step 1, and click Select Folder.
  6. Click Ok and click yes in the dialogue box that appears.
  7. Repeat these same steps for all users on the computer.
方案2,通过修改注册表搞定回收站问题,实际测试喜忧参半,通用性不高,不推荐

https://social.technet.micros...

Just copy and paste the following into notepad
and save it as "Network Recycling Bin - auto make registry file.bat"

echo off 
REM ========== MAIN FUNCTION  ======================== 
  
Call :CreateREGfile 
PAUSE 
goto :eof 
  
  
  
  
REM ========== SUB FUNCTIONS  ======================== 
  
:CreateREGfile 
set /p RelativePath=Enter current mapped path of drive (e.g. X:\FileShare\D_Drive): 
REM replace \ with \\ (for reg value its a requirement) 
Set RelativePath=%RelativePath:\=\\%  
  
  
set /p MaxBinSize_Dec=Enter max size (in mb) (eg 11gb=11000): 
call :toHex %MaxBinSize_Dec% MaxBinSize_Hex 
  
  
Set outputREG="Network Recycling Bin - %RelativePath:~0,1% Drive (%MaxBinSize_Dec%mb).reg" 
  
  
call :MakeGUID_VBS NewGUID 
REM echo My new GUID : %NewGUID% 
  
  
echo Windows Registry Editor Version 5.00 > %outputREG% 
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\%NewGUID%] >> %outputREG% 
echo "RelativePath"="%RelativePath%" >> %outputREG% 
echo "Category"=dword:00000004 >> %outputREG% 
echo "Name"="NetworkDrive2RecyclingBin_%NewGUID:~1,5%" >> %outputREG% 
      REM The "Name" value is required, but is not the name that will be shown if you right-click on the Recycle Bin and select properties. That will be autoset to the network drive name. 
echo.>> %outputREG% 
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\KnownFolder\%NewGUID%]  >> %outputREG% 
echo "MaxCapacity"=dword:%MaxBinSize_Hex% >> %outputREG% 
echo "NukeOnDelete"=dword:00000000 >> %outputREG% 
goto :eof 
  
  
  
:MakeGUID_VBS 
echo set obj = CreateObject("Scriptlet.TypeLib") > TEMP_generateGUID.vbs 
echo WScript.Echo obj.GUID >> TEMP_generateGUID.vbs 
FOR /F "usebackq tokens=*" %%rin (`CSCRIPT "TEMP_generateGUID.vbs"`)DO SET RESULT=%%r 
set %1=%RESULT% 
  
del TEMP_generateGUID.vbs 
goto :eof 
  
  
:toDec 
:: todec hex dec -- convert a hexadecimal number to decimal 
::             -- hex [in]      - hexadecimal number to convert 
::             -- dec [out,opt] - variable to store the converted decimal number in 
SETLOCAL 
set /a dec=0x%~1 
( ENDLOCAL & REM RETURN VALUES 
    IF "%~2" NEQ "" (SET %~2=%dec%)ELSE ECHO.%dec% 
) 
EXIT /b 
  
  
:toHex 
:: eg  call :toHex dec hex -- convert a decimal number to hexadecimal, i.e. -20 to FFFFFFEC or 26 to 0000001A 
::             -- dec [in]      - decimal number to convert 
::             -- hex [out,opt] - variable to store the converted hexadecimal number in 
::Thanks to 'dbenham' dostips forum users who inspired to improve this function 
:$created 20091203 :$changed 20110330 :$categories Arithmetic,Encoding 
:$source http://www.dostips.com 
SETLOCAL ENABLEDELAYEDEXPANSION 
set /a dec=%~1 
set "hex=" 
set "map=0123456789ABCDEF" 
for /L %%Nin (1,1,8)do ( 
    set /a "d=dec&15,dec>>=4" 
    for %%Din (!d!)do set "hex=!map:~%%D,1!!hex!" 
) 
rem !!!! REMOVE LEADING ZEROS by activating the next line, e.g. will return 1A instead of 0000001A 
rem for /f "tokens=* delims=0" %%A in ("%hex%") do set "hex=%%A"&if not defined hex set "hex=0" 
( ENDLOCAL & REM RETURN VALUES 
    IF "%~2" NEQ "" (SET %~2=%hex%)ELSE ECHO.%hex% 
) 
EXIT /b 
  
  
:eof

Network Recycle Bin Tool简介

本文主要使用Network Recycle Bin Tool Personal Client Machine Edition客户端

Server Edition

version 6.1.1.3

This version has been designed for the server usage. You should install it on the server to monitor shared folders. When network user will delete a shared file it will copy it to the "network recycle bin". You have not install any additional software on client machines.

Personal Client Machine Edition

version 5.2.3.8

When you delete a file stored on a network location or mapped network drive that the file is permanently deleted. It does not go to the local computer's recycle bin and does not go to the server's recycle bin.

How to enable a recycle bin for shared folders on a network ? There is the proper solution of restoring and securing your information even after deleting it - The Network Recycle Bin Tool allows you to recover deleted files.

Once you have this tool in your system, it will automatically keep a track of all the network deleted files and you can easily recover them. Instead of removing the files, this tool sends them directly to its predefined recycle bin folder.

There are various options to tune it up. For example: you can set size limits for files stored in the Network Recycle Bin, you can define the list of network drives or network folders to track deleted files.

Additionaly it offers you the Protect Files tool which prevents deletion of network files for specified folders according the file mask. Export and import functions help you to install software with same options on network machines. The password control disallows unauthorized access.

In the long run, losing your important network files and information accidentally is not an issue these days. Instead of getting anxious and worried, feel free to download network recycle bin tool from any reliable source and make sure that you have pre-installed this recovery tool.

Network Recycle Bin Tool使用方法

使用方法非常简单,安装好Network Recycle Bin Tool只需要4步即可,其它需求可以自定义Options
  1. 选择Protect Folders添加你需要保护的的映射网络驱动器
  2. Options中确认删除文件的存储路径,默认可以不修改
  3. 在映射网络驱动器中尝试删除测试文件,在Deleted Files可以看到删除的文件
  4. 可以批量选中要恢复或者删除的文件点击Recovery Files或者Delete Files



本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用Network Recycle Bin启用映射网络驱动器上的回收站 的相关文章

  • java 判断字符串是否是json格式

    2019独角兽企业重金招聘Python工程师标准 gt gt gt 两种实现方式 xff1a 1 通过fastjson解析来判断 xff0c 解析成功 xff0c 是json格式 xff1b 否则 xff0c 不是json格式 xff1a
  • Error response from daemon: Error processing tar file(exit status 1): remove /hosts: device or resou

    2019独角兽企业重金招聘Python工程师标准 gt gt gt You cannot copy over etc hosts Docker provides the container with a custom etc hosts f
  • Jquery动态添加标签元素,在指定标签前或者标签后(append/prepend用法)

    Jquery动态添加标签元素 在指定标签前或者标签后 xff08 append prepend用法 xff09 1 append 方法在被选元素的结尾插入指定内容 2 appendTo 方法在被选元素的结尾插入 HTML 元素 3 prep
  • ASP.NET中常用正则表达式

    34 d 43 34 非负整数 xff08 正整数 43 0 xff09 34 0 9 1 9 0 9 34 正整数 34 d 43 0 43 34 非正整数 xff08 负整数 43 0 xff09 34 0 9 1 9 0 9 34 负
  • 总结 IOS 7 内存管理

    iOS7的一些总结 5 iOS中的内存管理 我们知道 xff0c 为了更加方便地处理内存管理问题 xff0c 将开发人员从繁琐的内存的分配和释放工作中解放出来而专注于产品和逻辑 xff0c iOS提供了一种有效的方法 xff0c 即自动引用
  • 《STL源码剖析》---list容器insert操作的个人理解

    最近在看STL源码剖析 xff0c 感觉还是挺深奥的 xff0c 感觉看不太懂 今天在看list容器这块 xff0c 讲到了insert操作 xff0c 便记录一番自己的理解吧 摘抄书上的 xff1a iterator insert ite
  • PROCESS_YIELD()宏和C语言的switch语句< contiki学习笔记之七>

    写在前面 xff1a 按照main 函数的代码一行一行的分析 xff0c 该是看到了 etimer process 这个位置 但是etimer process实现里的一个宏 PROCESS YIELD 引出了很多故事 xff0c 于是单独把
  • 用c语言指针实现vector,C使用指针将对象添加到Vector中

    我有一个向量添加包含 SDL Surface 指针作为数据成员的对象 xff0c 这意味着我必须使用复制构造函数来实现指针的深层复制 该对象释放析构函数中的表面 指针 xff0c 这就是问题发生的地方 当对象被添加到向量中时 通过按下按钮
  • 【Http认证方式】——Basic认证

    访问请求 xff1a http 192 168 2 113 8080 geoserver rest workspaces时 xff0c 浏览器弹出窗口需要输入用户名和密码 xff0c 并且 xff0c 如果不输入或者输入错误 xff0c 浏
  • c++ http请求

    平常我们要访问某个URL一般都是通过浏览器进行 xff1a 提交一个URL请求后 xff0c 浏览器将请求发向目标服务器或者代理服务器 xff0c 目标服务器或者代理服务器返回我们所需要的数据 xff0c 浏览器接收到这些数据后保存成文件并
  • libcurl实现http登录功能

    用Fiddler Web Debugger捕捉http数据包 xff1a 观察看看 xff0c POST请求的地址为http passport cnblogs com login aspx ReturnUrl 61 http 3a 2f 2
  • 服务器机柜和网络机柜的区别

    原文转载自 http www fwqtg net 服务器机柜 xff0c 用来组合安装面板 插件 插箱 电子元件 器件和机械零件与部件 xff0c 使其构成一个整体的安装箱 服务器机柜由框架和盖板 xff08 门 xff09 组成 xff0
  • Eclipse+Maven创建webapp项目<一>

    Eclipse 43 Maven创建webapp项目 lt 一 gt 1 开启eclipse xff0c 右键new other xff0c 如下图找到maven project 2 选择maven project xff0c 显示创建ma
  • java日期格式(年月日时分秒毫秒)

    package test remote tools combine import java text SimpleDateFormat import java util Calendar import java util Date impo
  • 游戏中的帧同步要求的计算一致性——定点数(Fixed Point)

    最近做了一款帧同步游戏 xff0c 其寻路算法采用了RVO算法 但是由于是移动端的游戏 需要在不同的设备上运行 xff0c 其所有运算必须符合一致性 即所有客户端运算出来的结果必须一致 但是由于浮点数的特性 xff0c 具有误差 xff0c
  • 敏捷测试驱动模式-项目质量保障体系

    结合敏捷项目管理 xff0c 测试驱动模式 xff0c 让测试跑起来 我给这套体系的定义就是 保障质量的同时保证项目进度 xff0c 四个节点及时反馈及时沟通 xff0c 有效的让产品 研发和测试都动起来 xff0c 避免任意一方的停滞 质
  • angularjs自定义指令函数传参

    问题描述 在编写导入指令的时候 xff0c 需要将函数绑定到指令中 xff0c 并传入一个参数 初步实现 首先指令的js文件如下 xff0c 基本的绑定参数和绑定函数 xff0c 没有什么说的 xff1a angular module 39
  • 浅谈JSONObject解析JSON数据

    个人博客同步文章 https mr houzi com 2018 06 根据一段天气API来说一下JSONObject如何解析json数据 xff0c 尽管现在在开发中使用Gson等 xff0c 对于像我这样初次使用Java做开发的小白 x
  • 能ping通,但是不能wget或curl

    2019独角兽企业重金招聘Python工程师标准 gt gt gt 当出现http接口请求超时时 xff0c 可以从以下几个方面排查问题 xff1a 检查接口服务本身是否正常 xff1b 检查接口所在服务器的防火墙是否开启 xff0c 尝试
  • R语言选择特定的行,对某一列排序

    R语言的数据框跟MySQL 中的表很像 根据某一列的特定值选择相应的行 d是个数据框 xff0c 有一列的名字是name d d name 61 61 34 95 34 这样就选中了 name为 95 的所有行 m 是个数据框 xff0c

随机推荐

  • excel表格公式无效、不生效的解决方案及常见问题、常用函数

    1 表格公式无效 不生效 使用公式时碰到了一个问题 xff0c 那就是公式明明已经编辑好了 xff0c 但是在单元格里不生效 xff0c 直接把公式显示出来了 xff0c 网上资料说有4种原因 xff0c 但是我4种都不是 xff0c 是第
  • JVM_栈详解一

    1 Java虚拟机栈 2 栈的存储单位 栈中存储什么 xff1f 每个线程都有自己的栈 xff0c 栈中的数据都是以栈帧 xff08 Stack Frame xff09 的格式存在 在这个线程上正在执行的每个方法都各自对应一个栈帧 xff0
  • EntLib 3.1学习笔记(6) : Security Application Block

    http www microsoft com china MSDN library enterprisedevelopment softwaredev dnpag2entlib mspx mfr 61 true http msdn2 mic
  • Delphi文件操作所涉及的一些函数 附例子

    判断文件是否存在 FileExists 判断文件夹是否存在 DirectoryExists 删除文件 DeleteFile Windows DeleteFile 删除文件夹 RemoveDir RemoveDirectory 获取当前文件夹
  • 排序算法

    include lt iostream gt include lt cstdlib gt include lt cstdio gt include lt time h gt using namespace std 插入排序 void Ins
  • C++应用中调用YOLOv3(darknet)进行目标检测

    YOLOv3论文 xff1a https pjreddie com media files papers YOLOv3 pdf 官网和代码 xff1a https pjreddie com darknet yolo属于one stage x
  • DJI开发之航线重叠率的计算

    介绍 无人机在规划一块区域的时候 xff0c 我们需要手动的给予一些参数来影响无人机飞行 xff0c 对于一块地表 xff0c 无人机每隔N秒在空中间隔的拍照地表的一块区域 xff0c 在整个任务执行结束后 xff0c 拍到的所有区域照片能
  • MODBUS MASTER RTU在STM32上的实现

    MODBUS MASTER RTU在STM32上的实现 1 概述 最近需要将几个信号采集模块通过总线串联起来 xff0c 这样便于系统模块化 故将目光关注到了工业上经常使用的modbus协议 modbus协议是一种一主多从的拓扑结构 xff
  • 基于HttpClient的HttpUtils(后台访问URL)

    最近做在线支付时遇到需要以后台方式访问URL并获取其返回的数据的问题 xff0c 在网络上g了一把 xff0c 发现在常用的还是Apache的HttpClient 因为以经常要用到的原故 xff0c 因此我对其进行了一些简单的封装 xff0
  • micropython安装ros_ROS2与STM32入门教程-microROS的freertos版本

    ROS2与STM32入门教程 micro ros的freertos版本 说明 xff1a 介绍如何安装使用micro ros 测试开发板 xff1a olimex stm32 e407 步骤 xff1a 安装ros2版本foxy xff0c
  • C#中通过com组件操作excel不能关闭的问题

    问题 xff1a 当用如下代码操作完Excel xff0c 虽然调用了Application的Quit 方法 xff0c 但发现Excel进程并没退出 object missing 61 System Reflection Missing
  • 交叉编译的概念及交叉编译工具的安装

    目录 一 什么是交叉编译 二 为什么要交叉编译 xff1f 三 交叉编译链的安装 四 相关使用方法 五 软连接 一 什么是交叉编译 交叉编译是指将一种编程语言编写的程序编译成另一种编程语言的程序 xff0c 通常是在不同的操作系统或硬件环境
  • .cn根服务器被攻击之后

    如果是互联网行业的人员应该知道 xff0c 8月25日凌晨 xff0c 大批的 cn 域名的网站都无法访问 xff0c 当然包括weibo cn等大型网站 个人比较奇怪的一件事情是 xff0c 微博PC网页版是 www weibo com
  • [UML]UML系列——包图Package

    系列文章 UML UML系列 用例图Use Case UML UML系列 用例图中的各种关系 xff08 include extend xff09 UML UML系列 类图Class UML UML系列 类图class的关联关系 xff08
  • VBA编程中的 sheet1 与 sheets(1)的区别

    自己理解 sheet1是一个专有名词 xff0c 不是任何对象的属性 xff0c 只能单独使用 xff0c 特指代码所在工作簿的那个sheet1 和顺序无关 xff0c 是固定的一个表 xff0c sheets 1 则和顺序有关 参考资料
  • python练习笔记——计算1/1-1/3+1/5-1/7……的和

    1 1 1 3 43 1 5 1 7 43 求100000个这样的分式计算之为是多少 xff1f 将此值乘以4后打印出来 xff0c 看看是什么 xff1f num list 61 count 61 1 i 61 1 while True
  • Django Model获取指定列的数据

    model一般都是有多个属性的 xff0c 但是很多时候我们又只需要查询特定的某一个 xff0c 这个时候可以用到values和values list 利用values查询 from attendence models import Emp
  • HIVE自定义函数的扩展

    作者简介 淳敏 xff0c 物流架构师同时也是一位team leader xff0c 工作认真负责 xff0c 曾在休假期间 面向大海编程 xff0c 不明觉厉 在Hive中 xff0c 用户可以自定义一些函数 xff0c 用于扩展Hive
  • Flink Window分析及Watermark解决乱序数据机制深入剖析-Flink牛刀小试

    版权声明 xff1a 本套技术专栏是作者 xff08 秦凯新 xff09 平时工作的总结和升华 xff0c 通过从真实商业环境抽取案例进行总结和分享 xff0c 并给出商业应用的调优建议和集群环境容量规划等内容 xff0c 请持续关注本套博
  • 使用Network Recycle Bin启用映射网络驱动器上的回收站

    前言 在内网环境中我们经常会使用NAS或者Samba在Windows中映射网络驱动器 xff0c 方便局域网用户实时共享交换数据 但当存储在网络或映射网络上的任何文件被删除时 xff0c 该文件将被永久删除 它不会去到本地计算机回收站 xf