找到三種方法:
1、mklink法:
使 用Windows XP時(shí)習(xí)慣將“我的文檔”文件夾重定向到其他盤(pán)上,這樣重裝系統(tǒng)時(shí)丟失的數(shù)據(jù)少一點(diǎn)。在Win 7/Vista下情況有了變化,所有的用戶(hù)數(shù)據(jù)都被放到了“C:\Users\用戶(hù)名”這個(gè)地方,不但包括“我的文檔”“我的圖片”等用戶(hù)自己的文件,還 包括用戶(hù)的配置文件、IE的cookie、收藏夾、上網(wǎng)的臨時(shí)文件等等??上У氖悄J(rèn)情況下這個(gè)文件夾還是位于系統(tǒng)盤(pán),如果能放到別的盤(pán),那么重裝系統(tǒng)之 后,用戶(hù)所有的設(shè)置、數(shù)據(jù)將和重裝前一樣,那會(huì)多么方便呀。
關(guān)于Windows 7/vista下如何實(shí)現(xiàn)系統(tǒng)和用戶(hù)文件分區(qū)存放,這篇文章是很好的參考,其中關(guān)鍵步驟引用如下:
- 在“計(jì)算機(jī)管理”里把Administrator用戶(hù)激活,注銷(xiāo)后用Administrator登錄;
- 把“C:\Users\我的用戶(hù)名”整個(gè)目錄移到其它盤(pán)上,假設(shè)移到“D:\我的用戶(hù)名”;
- 用mklink.exe創(chuàng)建目錄鏈接:mklink.exe /D C:\Users\我的用戶(hù)名 D:\我的用戶(hù)名,提示會(huì)顯示鏈接已經(jīng)建立,并且會(huì)有“<==>”這樣一個(gè)符號(hào)告訴你這兩個(gè)目錄是等同的;
- 重新登錄你自己的賬號(hào),發(fā)現(xiàn)一切都沒(méi)有變化,變化的只是你的文件將和系統(tǒng)分離,它們將更安全!
- 下次重裝時(shí),還用同一個(gè)用戶(hù)名,先用Administrator登錄后把新系統(tǒng)中的”C:\Users\我的用戶(hù)名”刪除(否則mklink.exe會(huì)報(bào)無(wú)法創(chuàng)建鏈接),再用第3步把你位于D盤(pán)上的目錄重新做下鏈接即可
不過(guò)有些地方說(shuō)得不是很清楚,我照著做時(shí)遇到了一些問(wèn)題,下面是解決辦法和注意事項(xiàng):
我的電腦(右鍵)–>管理–>本地用戶(hù)和組(在左邊的選項(xiàng)欄里)–>用戶(hù)–>右邊窗口找到Administrator–>右鍵打開(kāi)Administrator屬性,找到下面的帳戶(hù)禁用那里,把那個(gè)禁用的勾勾去掉,點(diǎn)擊確定。
換用administrator登錄之后,試圖把“C:\Users\用戶(hù)名”整個(gè)目錄移到“D:\用戶(hù)名”,卻發(fā)現(xiàn)有些文件無(wú)法移動(dòng),無(wú)法刪除。 各種辦法都想盡了,UAC關(guān)了,權(quán)限全開(kāi)了,甚至把這個(gè)用戶(hù)賬號(hào)本身刪除了,但它遺留下來(lái)的User文件夾就是刪不了!此時(shí)真是感覺(jué)很無(wú)力,真不知道微軟 是怎么想的……還好裝有雙系統(tǒng),切換到另一個(gè)系統(tǒng)下面,這個(gè)系統(tǒng)下面的東西還不是想怎么刪就怎么刪,哼,死微軟~~
避免這種事情的辦法呢,就是真正要用的那個(gè)用戶(hù)名,最好創(chuàng)建之后,登錄一次,什么也別做,馬上換administrator。什么也別做,免得沒(méi)留神哪個(gè)操作又鎖定了什么文件導(dǎo)致無(wú)法移動(dòng);但是一定要登陸一次,讓W(xué)indows初始化一些設(shè)置,否則的話,下次登陸Windows很可能自作聰明地給你建一個(gè)名為“用戶(hù)名.計(jì)算機(jī)名”的文件夾,讓你水中撈月一場(chǎng)空……
Win+r,輸入cmd,打開(kāi)命令行界面。輸入:
mklink /D C:\Users\用戶(hù)名 D:\用戶(hù)名
雖然按理說(shuō)Windows系統(tǒng)是大小寫(xiě)不敏感的,但在我這參數(shù)/D一定要大寫(xiě)才能成功,也不知中了什么邪。
這樣弄完之后,再換用那個(gè)用戶(hù)名重新登陸——外表感覺(jué)不到有任何差別,但是內(nèi)在卻美了許多 :)
2、創(chuàng)建.bat文件:
Win7用戶(hù)文件夾轉(zhuǎn)移,自己用批處理寫(xiě)的??梢宰孕羞x擇用戶(hù)文件夾位置,修改了用戶(hù)文件夾的 下載、游戲存檔、桌面、音樂(lè)、收藏夾、圖片、視頻、文檔、緩存及IE臨時(shí)文件夾的位置,其他文件夾可以自行修改(不建議),如需修改將行首的 :: 刪除即可(Shell Folders及User Shell Folders需要同時(shí)修改)。
以下是批處理內(nèi)容,直接復(fù)制保存為.bat文件就能使用
@echo off
echo ============================================
echo .
echo .
echo By Terrorist
echo .
echo .
echo ============================================
echo 將用戶(hù)文件夾轉(zhuǎn)移到(直接回車(chē)將轉(zhuǎn)移至D:\Users\%USERNAME%\):
set /p UserFolderPath=
if not defined UserFolderPath set UserFolderPath=D:\Users\%USERNAME%\
xcopy "%USERPROFILE%" "%UserFolderPath%" /e /c /k /q /y /h
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{374DE290-123F-4565-9164-39C4925E467B}" /d "%UserFolderPath%\Downloads" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4}" /d "%UserFolderPath%\Saved Games" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{56784854-C6CB-462B-8169-88E350ACB882}" /d "%UserFolderPath%\Contacts" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{7D1D3A04-DEBB-4115-95CF-2F29DA2920DA}" /d "%UserFolderPath%\Searches" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968}" /d "%UserFolderPath%\Links" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Desktop" /d "%UserFolderPath%\Desktop" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Favorites" /d "%UserFolderPath%\Favorites" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Music" /d "%UserFolderPath%\Music" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Pictures" /d "%UserFolderPath%\Pictures" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Video" /d "%UserFolderPath%\Videos" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal" /d "%UserFolderPath%\Documents" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{1B3EA5DC-B587-4786-B4EF-BD1DC332AEAE}" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Libraries" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{A520A1A4-1780-4FF6-BD18-167343C5AF16}" /d "%UserFolderPath%\AppData\LocalLow" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Administrative Tools" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "AppData" /d "%UserFolderPath%\AppData\Roaming" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Cache" /d "%UserFolderPath%\AppData\Local\Microsoft\Windows\Temporary Internet Files" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "CD Burning" /d "%UserFolderPath%\AppData\Local\Microsoft\Windows\Burn\Burn" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Cookies" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Cookies" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "History" /d "%UserFolderPath%\AppData\Local\Microsoft\Windows\History" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Local AppData" /d "%UserFolderPath%\AppData\Local" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "NetHood" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Network Shortcuts" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "PrintHood" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Printer Shortcuts" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Programs" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Recent" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Recent" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "SendTo" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\SendTo" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Start Menu" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Start Menu" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Startup" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Templates" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Templates" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{374DE290-123F-4565-9164-39C4925E467B}" /d "%UserFolderPath%\Downloads" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4}" /d "%UserFolderPath%\Saved Games" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{56784854-C6CB-462B-8169-88E350ACB882}" /d "%UserFolderPath%\Contacts" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{7D1D3A04-DEBB-4115-95CF-2F29DA2920DA}" /d "%UserFolderPath%\Searches" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968}" /d "%UserFolderPath%\Links" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Desktop" /d "%UserFolderPath%\Desktop" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Favorites" /d "%UserFolderPath%\Favorites" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Music" /d "%UserFolderPath%\Music" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Pictures" /d "%UserFolderPath%\Pictures" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Video" /d "%UserFolderPath%\Videos" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /d "%UserFolderPath%\Documents" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "PrintHood" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Printer Shortcuts" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "AppData" /d "%UserFolderPath%\AppData\Roaming" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Cache" /d "%UserFolderPath%\AppData\Local\Microsoft\Windows\Temporary Internet Files" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Cookies" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Cookies" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "History" /d "%UserFolderPath%\AppData\Local\Microsoft\Windows\History" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Local AppData" /d "%UserFolderPath%\AppData\Local" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "NetHood" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Network Shortcuts" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Programs" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Recent" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Recent" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "SendTo" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\SendTo" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Start Menu" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Start Menu" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Startup" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" /f
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Templates" /d "%UserFolderPath%\AppData\Roaming\Microsoft\Windows\Templates" /f
echo 注銷(xiāo)或重啟后生效!
pause>nul
3、mklink的另一種方法
如果你用的是Windows 7操作系統(tǒng),還遇到想Windows 7操作系統(tǒng)中把“用戶(hù)文件夾”設(shè)置在非系統(tǒng)盤(pán)問(wèn)題,沒(méi)關(guān)系。本文為你詳解Windows 7操作系統(tǒng)把“用戶(hù)文件夾”設(shè)置在非系統(tǒng)盤(pán)。
注意:以下假設(shè)你想把用戶(hù)文件夾設(shè)置在D盤(pán),且假定D盤(pán)是NTFS分區(qū)。
一、在安裝Windows 7操作系統(tǒng)的過(guò)程中,要求輸入用戶(hù)名及密碼的時(shí)候,先不如輸入任何信息,按“Shift+F10”呼出DOS窗口,輸入以下命令:
robocopy "C:\Users" "D:\Users" /E /COPYALL /XJ
rmdir "C:\Users" /S /Q
mklink /J "C:\Users" "D:\Users"
而后關(guān)閉DOS窗口,按部就班繼續(xù)安裝直至完成。
如此安裝的Windows 7操作系統(tǒng),所有“用戶(hù)特殊文件夾”(User Special Folder)的內(nèi)容都已經(jīng)被設(shè)置在D盤(pán)(非系統(tǒng)盤(pán))上。
二、如果想要移動(dòng)已安裝好的Windows 7操作系統(tǒng)中的用戶(hù)文件夾,那么就要按以下步驟操作(稍微麻煩一點(diǎn),并且過(guò)程中可能會(huì)出現(xiàn)無(wú)法拷貝文件的情況):
0. 關(guān)閉所有應(yīng)用程序;
1. 按一下“Windows”鍵,輸入“計(jì)算機(jī)管理”之后按“Enter”,呼出“計(jì)算機(jī)管理器”;
2. 鼠標(biāo)點(diǎn)擊“Administrator”,選擇屬性,而后在隨后的對(duì)話框中去掉“帳戶(hù)已禁用”之前的勾,而后關(guān)閉“計(jì)算機(jī)管理器”;
3. 注銷(xiāo)當(dāng)前用戶(hù)(注意,不是“切換用戶(hù)”),而后以“Administrator”登錄
4. 打開(kāi)命令行窗口,輸入以下命令:robocopy "C:\Users" "D:\Users" /E /COPYALL /XJ /XD "C:\Users\Administrator"
5. 注銷(xiāo)Administrator,重新用你的用戶(hù)名登錄Windows 7操作系統(tǒng),而后到“計(jì)算機(jī)管理器”里禁用Administrator;
6. 以管理員身份打開(kāi)一個(gè)DOS窗口,輸入以下命令:
rmdir "C:\Users" /S /Q
mklink /J "C:\Users" "D:\Users"
操作以上步驟,你就成功的完成Windows 7操作系統(tǒng)把“用戶(hù)文件夾”設(shè)置在非系統(tǒng)盤(pán)中。
聯(lián)系客服