如何从废纸篓中批量恢复Mac OS误删除文件
时间:2022-08-27 14:08:30
不小心把“我的所有文件”里的文件给全删除了怎么办?我们需要从废纸篓中恢复,但是文件太多,要一个一个恢复,太浪费时间,下面我们来介绍一下批量恢复Mac OS误删除文件的方法。
如何从废纸篓中批量恢复Mac OS误删除文件
视频教程
1、先看看废纸篓里的文件。一个文件时,有“放回原处”的菜单的,如果是删除的两个文件里的文件时,没有放回原处的菜单了。而“我的所有文件”是每个文件夹的文件都会有的。所以除非人力点击,一个一个的还原。
2、所以我们要批量实现还原文件,就借助 苹果电脑提供的脚本编辑器程序。第一步,先找到脚本编辑器。打开下面菜单中的第三个图标 launchpad,搜索 automator。就是图片上的小机器人。
3、打开automator ,找到里面的“服务”。在左边菜单中找到“运行AppleScript” 双击。
4、在运行AppleScript的编辑框里输入一下代码。
tell application "Finder"
activate
set file_count to count of (trash's items)
-- log file_count
repeat file_count times
recoverMyFile() of me
end repeat
end tell
on recoverMyFile()
tell application "System Events"
set frontmost of process "Finder" to true
tell application "Finder"
open trash
select the first item of window "Trash"
end tell
tell process "Finder"
key code 51 using command down
delay 1 -- Yes, it's stupid, but necessary :(
end tell
end tell
5、点击上面的 运行(三角行那个)。开始就看到屏幕自己切换,听到 duang,duang,duang的声音就成功了,等到完成就行了。
6、如果提示一下错误。请将脚本代码中的
select the first item of window "Trash"
替换为
select the first item of window "废纸篓"
7、如果运行一段时间后脚本运行错误,提示以下错误时,需要将废纸篓中的当前文件手动恢复活着删除。
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
猫咪回收站不支持win11吗?win11猫咪回收站怎么设置?
![](https://img.aspxhome.com/file/2023/1/a271959_0s.jpg)
豆腐app的豆子有什么用?豆腐豆子的使用方法
![](https://img.aspxhome.com/file/2023/8/a333647_0s.jpg)
Win7怎么设置屏幕不休眠?
![](https://img.aspxhome.com/file/2023/27/a230479_0s.jpg)
Win10搜索不到共享打印机怎么办
![](https://img.aspxhome.com/file/2023/7/49737_0s.jpg)
怎么打开CAJ格式的文件?CAJ格式文件转换成PDF格式教程
![](https://img.aspxhome.com/file/2023/9/a340329_0s.jpg)
win10系统禁止在桌面创建文件的方法
![](https://img.aspxhome.com/file/2023/4/a309915_0s.png)
WPS word文档如何进行保护
![](https://img.aspxhome.com/file/2023/1/a185961_0s.jpg)
Win10系统更新出错提示以下信息可能会对你有帮助0xc1900130怎么解决?
![](https://img.aspxhome.com/file/2023/26/a221322_0s.jpg)
网易云音乐怎么收藏视频?网易云音乐视频收藏方法分享
![](https://img.aspxhome.com/file/2023/7/a331119_0s.jpg)
Win10外置光驱放入光盘没反应问题的原因及解决方法
![](https://img.aspxhome.com/file/2023/28/a244239_0s.jpg)
Win10如何添加白名单?Win10在安全中心添加排除项的方法
![](https://img.aspxhome.com/file/2023/25/a217859_0s.jpg)
电子文档比纸质文档好在哪里
![](https://img.aspxhome.com/file/2023/9/a343422_0s.jpg)
edge怎么启动flash?flash启动不了解决办法
![](https://img.aspxhome.com/file/2023/5/47105_0s.jpg)
win7查看电脑配置信息的方法
![](https://img.aspxhome.com/file/2023/1/a273792_0s.jpg)
美间软装软件怎么上传单品?美间软装软件上传单品的操作步骤
![](https://img.aspxhome.com/file/2023/7/a332550_0s.jpg)
windows8装.NET 3.5时出现0x800F0906错误解决方案
![](https://img.aspxhome.com/file/2023/29/a257367_0s.jpg)
如何把WPS文字里的内容分列插入到 WPS表格中
![](https://img.aspxhome.com/file/2023/6/a186716_0s.jpg)
Win10如何清除搜索结果中的网页内容提示
![](https://img.aspxhome.com/file/2023/26/a226539_0s.jpg)
win7设置禁止桌面图标更改以防他人乱改
![](https://img.aspxhome.com/file/2023/29/a251870_0s.jpg)
如何解决爱思助手无法删除图片的问题?
![](https://img.aspxhome.com/file/2023/8/a336916_0s.png)