如何用BAT或VBS将C盘的用户文档和临时文件转移到D

来源:百度知道 编辑:UC知道 时间:2024/05/17 01:57:01
忘记说了 还有页面文件
若回答的好 我再追加1000分
先谢谢各位了
是把所有能转移的变量都转过去,尽可能的不对C盘读写

已经帮你写好了,写了半天,主要是那么多键值,得慢慢对,很累人的。.

@echo off
rem 将“我的文档”移动到D盘下的ccc文件夹,然后删除“我的文档”
set "path=d:\ccc"
md "%ljpath%"
xcopy /e /q /h /i /c /y "C:\Documents and Settings\Administrator\My Documents" "%ljpath%\"
rd /s /q "C:\Documents and Settings\Administrator\My Documents"

rem 修改注册表
echo 开始修改注册表,
reg add "hkcu\software\microsoft\windows\currentversion\explorer\user shell folders" /v personal /t reg_expand_sz /d "%ljpath%" /f
reg add "hkcu\software\microsoft\windows\currentversion\explorer\user shell folders" /v "My Music" /t reg_expand_sz /d "%ljpath%\My Music" /f
reg add "hkcu\software\microsoft\windows\currentversion\explorer\user shell folders" /v "My Pictures" /t reg_expand_sz /d "%ljpath%&