无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 64913|回复: 97
打印 上一主题 下一主题

一键转移个人资料 v1.0 (build 2011.06.24)

    [复制链接]
跳转到指定楼层
1#
发表于 2011-6-24 13:19:51 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
一键转移个人资料 v1.0

    重装系统之后,我习惯在"一键GHOST备份系统"之前将个人资料永久转移到D盘,
目的很简单:避免"一键GHOST恢复系统"后,新近产生的个人资料丢失,另外,可以减小GHO体积。
个人资料包括:桌面、收藏夹、我的文档、共享文档、cookies,
本程序采用批处理方式制作,优点是:执行效率高、节省时间;开放源代码,便于分享、扩展与提高。


    希望大家试用并提出宝贵意见.
    有任何问题请 回复此贴,不要发新贴。


无忧论坛 DOS讨论区 版主 gmy 制作
2011.6.24

一键转移个人资料v1.0.bat 源代码
  1. @echo off
  2. cls
  3. echo 欢迎使用 一键转移个人资料 v1.0
  4. echo.
  5. echo 转移的目标路径是
  6. echo D:\桌面
  7. echo D:\收藏夹
  8. echo D:\我的文档
  9. echo D:\共享文档
  10. echo D:\我的文档\cookies
  11. echo.
  12. echo 按任意键开始转移。
  13. pause >nul
  14. if not exist d:\ goto end
  15. md D:\桌面
  16. md D:\收藏夹
  17. md D:\我的文档
  18. md D:\共享文档
  19. md D:\我的文档\cookies
  20. REM 默认路径
  21. xcopy "C:\Documents and Settings\%USERNAME%\桌面\*.*" D:\桌面 /e /h /c /y
  22. xcopy "%ALLUSERSPROFILE%\桌面\*.*" D:\桌面 /e /h /c /y
  23. xcopy "C:\Documents and Settings\%USERNAME%\Favorites\*.*" D:\收藏夹 /e /h /c /y
  24. xcopy "%ALLUSERSPROFILE%\Favorites\*.*" D:\收藏夹 /e /h /c /y
  25. xcopy "C:\Documents and Settings\%USERNAME%\My Documents\*.*" D:\我的文档 /e /h /c /y
  26. xcopy "%ALLUSERSPROFILE%\Documents\*.*" D:\共享文档 /e /h /c /y
  27. xcopy "C:\Documents and Settings\%USERNAME%\cookies\*.*" D:\我的文档\cookies /e /h /c /y
  28. REM 兼容其它优化程序设置的路径
  29. xcopy "D:\My Documents\desktop\*.*" D:\桌面 /e /h /c /y
  30. xcopy "D:\My Documents\桌面\*.*" D:\桌面 /e /h /c /y
  31. xcopy "D:\desktop\*.*" D:\桌面 /e /h /c /y
  32. xcopy "D:\My Documents\Favorites\*.*" D:\收藏夹 /e /h /c /y
  33. xcopy "D:\My Documents\收藏夹\*.*" D:\收藏夹 /e /h /c /y
  34. xcopy "D:\Favorites\*.*" D:\收藏夹 /e /h /c /y
  35. xcopy "D:\My Documents\*.*" D:\我的文档 /e /h /c /y
  36. xcopy "D:\My Documents\cookies\*.*" D:\我的文档\cookies /e /h /c /y
  37. xcopy "D:\cookies\*.*" D:\我的文档\cookies /e /h /c /y
  38. regedit /s newdir.reg
  39. cls
  40. echo 执行完毕,重启才能生效,请关闭正在使用的其它软件,按任意键将重启电脑。
  41. pause >nul
  42. shutdown -r
  43. :end
复制代码
newdir.reg 源代码
  1. Windows Registry Editor Version 5.00
  2. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DocFolderPaths]
  3. "Administrator"="D:\\我的文档"
  4. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
  5. "Personal"="D:\\我的文档"
  6. "CommonPictures"="D:\\我的文档\\My Pictures"
  7. "CommonMusic"="D:\\我的文档\\My Music"
  8. "CommonVideo"="D:\\我的文档\\My Videos"
  9. "Common Favorites"="D:\\收藏夹"
  10. "Common Desktop"="C:\\Documents and Settings\\All Users\\桌面"
  11. "Common Documents"="D:\\共享文档"
  12. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
  13. "Personal"="D:\\我的文档"
  14. "My Pictures"="D:\\我的文档\\My Pictures"
  15. "My Music"="D:\\我的文档\\My Music"
  16. "My Video"="D:\\我的文档\\My Videos"
  17. "Cookies"="D:\\我的文档\\Cookies"
  18. "Favorites"="D:\\收藏夹"
  19. "Desktop"="D:\\桌面"
  20. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
  21. "Personal"=hex(2):44,00,3a,00,5c,00,11,62,84,76,87,65,63,68,00,00
  22. "CommonPictures"=hex(2):44,00,3a,00,5c,00,11,62,84,76,87,65,63,68,5c,00,4d,00,79,\
  23.   00,20,00,50,00,69,00,63,00,74,00,75,00,72,00,65,00,73,00,00,00
  24. "CommonMusic"=hex(2):44,00,3a,00,5c,00,11,62,84,76,87,65,63,68,5c,00,4d,00,79,00,\
  25.   20,00,4d,00,75,00,73,00,69,00,63,00,00,00
  26. "CommonVideo"=hex(2):44,00,3a,00,5c,00,11,62,84,76,87,65,63,68,5c,00,4d,00,79,00,\
  27.   20,00,56,00,69,00,64,00,65,00,6f,00,73,00,00,00
  28. "Common Favorites"=hex(2):44,00,3a,00,5c,00,36,65,cf,85,39,59,00,00
  29. "Common Desktop"=hex(2):25,00,41,00,4c,00,4c,00,55,00,53,00,45,00,52,00,53,00,\
  30.   50,00,52,00,4f,00,46,00,49,00,4c,00,45,00,25,00,5c,00,4c,68,62,97,00,00
  31. "Common Documents"=hex(2):44,00,3a,00,5c,00,71,51,ab,4e,87,65,63,68,00,00
  32. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
  33. "Personal"=hex(2):44,00,3a,00,5c,00,11,62,84,76,87,65,63,68,00,00
  34. "My Pictures"=hex(2):44,00,3a,00,5c,00,11,62,84,76,87,65,63,68,5c,00,4d,00,79,\
  35.   00,20,00,50,00,69,00,63,00,74,00,75,00,72,00,65,00,73,00,00,00
  36. "My Music"=hex(2):44,00,3a,00,5c,00,11,62,84,76,87,65,63,68,5c,00,4d,00,79,00,\
  37.   20,00,4d,00,75,00,73,00,69,00,63,00,00,00
  38. "My Video"=hex(2):44,00,3a,00,5c,00,11,62,84,76,87,65,63,68,5c,00,4d,00,79,00,\
  39.   20,00,56,00,69,00,64,00,65,00,6f,00,73,00,00,00
  40. "Cookies"=hex(2):44,00,3a,00,5c,00,11,62,84,76,87,65,63,68,5c,00,43,00,6f,00,\
  41.   6f,00,6b,00,69,00,65,00,73,00,00,00
  42. "Favorites"=hex(2):44,00,3a,00,5c,00,36,65,cf,85,39,59,00,00
  43. "Desktop"=hex(2):44,00,3a,00,5c,00,4c,68,62,97,00,00
复制代码
下载地址见附件:



[ 本帖最后由 gmy 于 2011-6-24 16:08 编辑 ]

1KEY_MOVE.rar

1.97 KB, 下载次数: 1966, 下载积分: 无忧币 -2

一键转移个人资料_20110624

点评

www.xuexi366.com/BOOK/674/ 骗个明星当老婆  发表于 2015-3-3 11:50

评分

参与人数 1无忧币 +3 收起 理由
weiling103 + 3 很给力!

查看全部评分

2#
 楼主| 发表于 2011-6-25 14:21:38 | 显示全部楼层
原帖由 sdshi 于 2011-6-25 10:06 发表
xp和win7都可以用么?


目前仅在XP下测试过。还得请有WIN7的网友们测试一下才能知道能否使用。我估计是通用的。

[ 本帖最后由 gmy 于 2011-6-25 14:26 编辑 ]
回复

使用道具 举报

3#
 楼主| 发表于 2011-6-25 14:24:59 | 显示全部楼层
原帖由 fanghui 于 2011-6-24 23:39 发表
bat是转移个人资料的批处理,那么regedit /s newdir.reg 又是什么作用?


修改注册表啊!newdir.reg是我随便起的名字,意思为“新目录”,可以改成其它名字。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-5-2 22:55

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表