I saw online that someone made a C drive data transfer tool. The realization principle is like this:
There are five folders in the compressed file: temp, oe, my documents, favorites, desktop. When self-extracting, these five folders are extracted to d:\personal. Then a bat file is used to call the xcopy command to copy all the contents of the corresponding folders on the C drive over. Finally, a reg file is used to change the corresponding file paths in the registry to the folders under d:\personal.
REGEDIT4
"Cache"="D:\\Personal\\Temporary Internet Files"
"Desktop"="D:\\Personal\\Desktop"
"Favorites"="D:\\Personal\\Favorites"
"Personal"="D:\\Personal\\My Documents"
"My Music"="D:\\Personal\\My Documents\\My Pictures"
"My Pictures"="D:\\Personal\\My Documents\\My Pictures"
"Recent"="D:\\Personal\\Recent"
"Cache"="D:\\Personal\\Temporary Internet Files"
"Desktop"="D:\\Personal\\Desktop"
"My Music"="D:\\Personal\\My Documents\\My Pictures"
"My Pictures"="D:\\Personal\\My Documents\\My Pictures"
"Favorites"="D:\\Personal\\Favorites"
"Personal"="D:\\Personal\\My Documents"
"Recent"="D:\\Personal\\Recent"
"Store Root"="D:\\Personal\\Outlook Express"
"Desktop"="D:\\Personal\\Desktop"
"Cache"="D:\\Personal\\My Documents"
"Download Directory"="D:\\Personal\\My Documents"
"TEMP"="D:\\Personal\\Temp"
"TMP"="D:\\Personal\\Temp"
bat:
@echo off
rem The following command has the /s parameter added, so there is no need to confirm when importing the registry.
echo Installing...
regedit.exe /s shell.reg
if exist c:\windows\system\Dxdiag.exe goto 98
xcopy C:\Docume~1\%USERNAME%\Mydocu~1\*.* D:\Personal\Mydocu~1\ /e /y
xcopy C:\Docume~1\%USERNAME%\Desktop\*.* D:\Personal\Desktop\ /e /y
xcopy C:\Docume~1\%USERNAME%\桌面\*.* D:\Personal\Desktop\ /e /y
xcopy C:\Docume~1\%USERNAME%\Favori~1\*.* D:\Personal\Favori~1\ /e /y
goto end
:98
xcopy C:\Mydocu~1\*.* D:\Personal\Mydocu~1\ /e /y
xcopy C:\WINDOWS\Desktop\*.* D:\Personal\Desktop\ /e /y
xcopy C:\WINDOWS\Favori~1\*.* D:\Personal\Favori~1\ /e /y
:end
del D:\Personal\Shell.reg >nul
del %0
echo Installation completed!
I once tried to use the md command to create the above files, but found that I couldn't create folders with spaces in the middle like "MY documents", "My pictures", "My Music". I also encountered such problems before, for example, when I used batch processing to delete files, if the file name contained spaces, it couldn't be deleted correctly. How should this problem be dealt with?
--------------------------------------------------------------------------------------------------------
The author also has such a passage in the compressed file annotation: Open OE, find Tools - Options - Maintenance - Storage Folder, click "Change", and change the path of the storage location to D:\Personal\OE. In this way, when using OneKey Ghost to restore the system later, there is no need to back up the files in these folders.
Is there a way to realize this operation through the registry or batch processing?
----------------------------------------------------------------------------------------------------------
[ Last edited by zorsite on 2006-11-9 at 12:27 AM ]
There are five folders in the compressed file: temp, oe, my documents, favorites, desktop. When self-extracting, these five folders are extracted to d:\personal. Then a bat file is used to call the xcopy command to copy all the contents of the corresponding folders on the C drive over. Finally, a reg file is used to change the corresponding file paths in the registry to the folders under d:\personal.
REGEDIT4
"Cache"="D:\\Personal\\Temporary Internet Files"
"Desktop"="D:\\Personal\\Desktop"
"Favorites"="D:\\Personal\\Favorites"
"Personal"="D:\\Personal\\My Documents"
"My Music"="D:\\Personal\\My Documents\\My Pictures"
"My Pictures"="D:\\Personal\\My Documents\\My Pictures"
"Recent"="D:\\Personal\\Recent"
"Cache"="D:\\Personal\\Temporary Internet Files"
"Desktop"="D:\\Personal\\Desktop"
"My Music"="D:\\Personal\\My Documents\\My Pictures"
"My Pictures"="D:\\Personal\\My Documents\\My Pictures"
"Favorites"="D:\\Personal\\Favorites"
"Personal"="D:\\Personal\\My Documents"
"Recent"="D:\\Personal\\Recent"
"Store Root"="D:\\Personal\\Outlook Express"
"Desktop"="D:\\Personal\\Desktop"
"Cache"="D:\\Personal\\My Documents"
"Download Directory"="D:\\Personal\\My Documents"
"TEMP"="D:\\Personal\\Temp"
"TMP"="D:\\Personal\\Temp"
bat:
@echo off
rem The following command has the /s parameter added, so there is no need to confirm when importing the registry.
echo Installing...
regedit.exe /s shell.reg
if exist c:\windows\system\Dxdiag.exe goto 98
xcopy C:\Docume~1\%USERNAME%\Mydocu~1\*.* D:\Personal\Mydocu~1\ /e /y
xcopy C:\Docume~1\%USERNAME%\Desktop\*.* D:\Personal\Desktop\ /e /y
xcopy C:\Docume~1\%USERNAME%\桌面\*.* D:\Personal\Desktop\ /e /y
xcopy C:\Docume~1\%USERNAME%\Favori~1\*.* D:\Personal\Favori~1\ /e /y
goto end
:98
xcopy C:\Mydocu~1\*.* D:\Personal\Mydocu~1\ /e /y
xcopy C:\WINDOWS\Desktop\*.* D:\Personal\Desktop\ /e /y
xcopy C:\WINDOWS\Favori~1\*.* D:\Personal\Favori~1\ /e /y
:end
del D:\Personal\Shell.reg >nul
del %0
echo Installation completed!
I once tried to use the md command to create the above files, but found that I couldn't create folders with spaces in the middle like "MY documents", "My pictures", "My Music". I also encountered such problems before, for example, when I used batch processing to delete files, if the file name contained spaces, it couldn't be deleted correctly. How should this problem be dealt with?
--------------------------------------------------------------------------------------------------------
The author also has such a passage in the compressed file annotation: Open OE, find Tools - Options - Maintenance - Storage Folder, click "Change", and change the path of the storage location to D:\Personal\OE. In this way, when using OneKey Ghost to restore the system later, there is no need to back up the files in these folders.
Is there a way to realize this operation through the registry or batch processing?
----------------------------------------------------------------------------------------------------------
[ Last edited by zorsite on 2006-11-9 at 12:27 AM ]
