无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 6476|回复: 13

[分享] 转移用户文件位置

  [复制链接]
发表于 2018-8-6 20:25:10 | 显示全部楼层 |阅读模式
不通位置请自行修改
  1. taskkill /im explorer.exe /f
  2. if exist d:\我的文档 (
  3. xcopy /s /h /k /y %userprofile%\Documents d:\我的文档
  4. rd %userprofile%\Documents /s /q
  5. mklink /d %userprofile%\Documents d:\我的文档
  6. ) else (
  7. if exist d:\Documents (
  8. xcopy /s /h /k /y %userprofile%\Documents d:\Documents
  9. rd %userprofile%\Documents /s /q
  10. mklink /d %userprofile%\Documents d:\Documents
  11. ) else (
  12. md d:\我的文档
  13. xcopy /s /h /k /y %userprofile%\Documents d:\我的文档
  14. rd %userprofile%\Documents /s /q
  15. mklink /d %userprofile%\Documents d:\我的文档
  16. )
  17. )

  18. if exist d:\桌面 (
  19. xcopy /s /h /k /y %userprofile%\desktop d:\桌面
  20. rd %userprofile%\desktop /s /q
  21. mklink /d %userprofile%\desktop d:\桌面
  22. ) else (
  23. if exist d:\desktop (
  24. xcopy /s /h /k /y %userprofile%\desktop d:\desktop
  25. rd %userprofile%\desktop /s /q
  26. mklink /d %userprofile%\desktop d:\desktop
  27. ) else (
  28. md d:\桌面
  29. xcopy /s /h /k /y %userprofile%\desktop d:\桌面
  30. rd %userprofile%\desktop /s /q
  31. mklink /d %userprofile%\desktop d:\桌面
  32. )
  33. )

  34. if exist d:\收藏夹 (
  35. xcopy /s /h /k /y %userprofile%\Favorites d:\收藏夹
  36. rd %userprofile%\Favorites /s /q
  37. mklink /d %userprofile%\Favorites d:\收藏夹
  38. ) else (
  39. if exist d:\Favorites (
  40. xcopy /s /h /k /y %userprofile%\Favorites d:\Favorites
  41. rd %userprofile%\Favorites /s /q
  42. mklink /d %userprofile%\Favorites d:\Favorites
  43. ) else (
  44. md d:\收藏夹
  45. xcopy /s /h /k /y %userprofile%\Favorites d:\收藏夹
  46. rd %userprofile%\Favorites /s /q
  47. mklink /d %userprofile%\Favorites d:\收藏夹
  48. )
  49. )
  50. explorer

复制代码



发表于 2018-8-6 20:57:51 | 显示全部楼层
之前论坛,好像有人发过一个老长的批处理。。。

点评

http://bbs.wuyou.net/forum.php?mod=viewthread&tid=403551&extra=  发表于 2018-8-6 22:24
回复

使用道具 举报

发表于 2018-8-6 21:14:54 | 显示全部楼层
@echo off
cls
echo 欢迎使用 一键转移用户目录
echo.
echo 转移的目标路径是
echo D:\桌面
echo D:\收藏夹
echo D:\我的文档
echo D:\共享文档
echo D:\我的文档\cookies
echo.
echo 按任意键开始转移。
pause >nul
if not exist d:\ goto end
md D:\桌面
md D:\收藏夹
md D:\我的文档
md D:\共享文档
md D:\我的文档\cookies
REM 默认路径
xcopy "C:\Documents and Settings\%USERNAME%\桌面\*.*" D:\桌面 /e /h /c /y
xcopy "%ALLUSERSPROFILE%\桌面\*.*" D:\桌面 /e /h /c /y
xcopy "C:\Documents and Settings\%USERNAME%\Favorites\*.*" D:\收藏夹 /e /h /c /y
xcopy "%ALLUSERSPROFILE%\Favorites\*.*" D:\收藏夹 /e /h /c /y
xcopy "C:\Documents and Settings\%USERNAME%\My Documents\*.*" D:\我的文档 /e /h /c /y
xcopy "%ALLUSERSPROFILE%\Documents\*.*" D:\共享文档 /e /h /c /y
xcopy "C:\Documents and Settings\%USERNAME%\cookies\*.*" D:\我的文档\cookies /e /h /c /y
REM 兼容其它优化程序设置的路径
xcopy "D:\My Documents\desktop\*.*" D:\桌面 /e /h /c /y
xcopy "D:\My Documents\桌面\*.*" D:\桌面 /e /h /c /y
xcopy "D:\desktop\*.*" D:\桌面 /e /h /c /y
xcopy "D:\My Documents\Favorites\*.*" D:\收藏夹 /e /h /c /y
xcopy "D:\My Documents\收藏夹\*.*" D:\收藏夹 /e /h /c /y
xcopy "D:\Favorites\*.*" D:\收藏夹 /e /h /c /y
xcopy "D:\My Documents\*.*" D:\我的文档 /e /h /c /y
xcopy "D:\My Documents\cookies\*.*" D:\我的文档\cookies /e /h /c /y
xcopy "D:\cookies\*.*" D:\我的文档\cookies /e /h /c /y
regedit /s newdir.reg
cls
echo 程序执行完毕,重启才能生效,请关闭正在使用的其它软件,按任意键将重启电脑。
pause >nul
shutdown -r
:end
回复

使用道具 举报

 楼主| 发表于 2018-8-6 21:17:32 来自手机 | 显示全部楼层
嗯,一般都是连注册表一起改,我这个是不改注册表,利用软连接。
回复

使用道具 举报

 楼主| 发表于 2018-8-6 21:19:30 来自手机 | 显示全部楼层
这段时间做的无盘活儿,d盘是映射网络磁盘,桌面启动网络磁盘的快捷方式会警告,变成连接到d盘就不会警告了。
回复

使用道具 举报

发表于 2018-8-6 22:27:33 | 显示全部楼层
http://bbs.wuyou.net/forum.php?m ... d=403551&extra=
1、自动推荐盘符
2、带恢复默认值功能
3、带复制后删除原文件功能
4、即时生效
5、。。。
回复

使用道具 举报

发表于 2018-8-7 08:34:23 | 显示全部楼层
本帖最后由 9zhmke 于 2018-8-7 08:47 编辑

很巧妙地使用mklink 转换,比改注册表更稳,免得一些软件扯拐。
不过这样会占用D盘好几个目录,很早前就想和大家一起探讨下这些目录的存放方式了,在装机界应该讨论个通识出来才最好。
我常用的方式如下,特点是只占用一个“我的文档”文件夹,把桌面、开始、收藏、百度、阿里等都放到了“系统设置”下面,是否妥当需要大家讨论下。
我在装机时占用用户的文件夹除了“我的文档”外还有一个是Setup,放一些安装盘、驱动、字体之类,和一些不需要安装的绿色软件。
[code]
D:\我的文档
    ├─Arduino
    ├─Software's
    │  ├─......
    ├─Tencent Files
    ├─图片收藏夹
    │  ├─_证件卡包勿外传
    │  ├─搞笑类
    │  ├─方案 借鉴
    │  ├─装修规划和绿化
    │  ├─视觉和艺术
    │  └─风景欣赏
    ├─系统设置
    │  ├─Tencent Files
    │  ├─ThunderProfile
    │  ├─WeChat Files
    │  ├─开始菜单
    │  │  ├─常用工具
    │  │  │  └─专业软件
    │  │  ├─影音图及娱乐
    │  │  └─编程和电子
    │  ├─收藏夹
    │  │  └─链接
    │  ├─桌面
    │  ├─百度云Profile
    │  └─阿里旺旺profiles
    └─音乐收藏夹
[code]
回复

使用道具 举报

发表于 2018-8-7 09:09:01 | 显示全部楼层
明明 剪下 貼上 就好了阿。
而 AppData 我則是在 PE 下灌好系統後
也是直接在 PE 下 mklink 轉移 AppData

点评

不是所有目录都可以剪下貼上的,而且作为装机者来说,每个系统都去手动操作烦心不?  详情 回复 发表于 2018-8-7 09:20
回复

使用道具 举报

发表于 2018-8-7 09:20:48 | 显示全部楼层
guies 发表于 2018-8-7 09:09
明明 剪下 貼上 就好了阿。
而 AppData 我則是在 PE 下灌好系統後
也是直接在 PE 下 mklink 轉移 AppData ...

不是所有目录都可以剪下貼上的,而且作为装机者来说,每个系统都去手动操作烦心不?
回复

使用道具 举报

 楼主| 发表于 2018-8-7 09:44:34 来自手机 | 显示全部楼层
开始菜单我觉得没必要,不爱用微信,这两天需要琢磨它,发现微信电脑版的问题,有的人有习惯把记录保存在电脑版上。
回复

使用道具 举报

发表于 2018-8-7 10:48:00 来自手机 | 显示全部楼层
实际上吧,我记得无人值守文件有设置位置的选项好像
回复

使用道具 举报

发表于 2018-8-7 13:10:21 | 显示全部楼层
我个人用的是,autoit模拟右键文件夹,移动的方式...
至于路径组织结构个人习惯保持Windows的C盘下的目录结构,Users\<用户名>\xxxx,
可以支持多用户.另外会包含desktop.ini所以虽然是英文名,也一样根据不同语言显示,算是正规套路吧,
不过,右键属性,移动,修改路径,确定,存在文件是否移动...一系列对话框自动确定比注册表一键修改要慢很多.
不过刚装好系统设置一次都是空目录也就是不到1分钟,反正自动的个人用还好,批量的话,其实注册表强改也没啥问题.

CtoD.png
回复

使用道具 举报

发表于 2018-8-7 13:31:19 | 显示全部楼层
本人实际使用时,是建好的空目录+注册表, 注销或者重启,即可.

最好是系统第一次进桌面,就操作.

如果是用了一定时间的,PE下复制粘贴.
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2024-3-28 18:17

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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