备份收藏夹的批处理如何做?

来源:百度知道 编辑:UC知道 时间:2024/06/30 19:20:56
备份收藏夹到我的文档里面的批处理如何做?

bat:

@echo off
md 你要备份的目录位置
xcopy "%userprofile%\Favorites\*.*" 你要备份的目录位置 /e /s /y
pause

存为.BAT文件即可,将此BAT文件放到启动目录中....如果觉得有必要的话可以隐藏运行窗口

reg:

下面代码另存为.reg,导入可以将收藏夹位置改为D:\Favorites

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"Favorites"="D:\\Favorites"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
"Favorites"=hex(2):44,00,3a,00,5c,00,46,00,61,00,76,00,6f,00,72,00,69,00,74,00,\
65,00,73,00,00,00