Mover a pasta AppData do usuário do Google Chrome para outro local do Drive
Você pode usar Robocopy com os parâmetros aplicáveis para copiar o diretório C:\Users\%username%\AppData\Local\Google\Chrome
para o novo local da unidade onde deseja os arquivos do Google Chrome , exclua a pasta ~\Chrome
original e use mklink para crie um link simbólico de diretório para o local na outra partição da unidade de disco.
Script em lote
Note: Be sure to right-click and select
run as administrator
when you run this script. Also, set the value in theDest=
variable to be the new full path and folder name you want the Chrome user profile/appdata
directory to reside on the other drive location but make this be a folder likeD:\Chrome
or something meaningful and not the root of the drive likeD:\
. Just save below logic to a text file and rename to<something>.cmd
and right-click to run as administrator.
@ECHO ON
SET Src=C:\Users\%username%\AppData\Local\Google\Chrome
SET Dest=D:\Chrome
TASKKILL /F /IM "chrome.exe"
IF NOT EXIST "%Dest%" MD "%Dest%"
SET FName=*.*
SET OPT=/PURGE /S /ZB /SEC /COPYALL /SECFIX /R:5 /W:5 /TS /FP
SET CMD=robocopy "%Src%" %FName% "%Dest%" %OPT%
%CMD%
IF EXIST "%Src%" RD /S /Q "%Src%"
MKLINK /D "%Src%" "%Dest%"
PAUSE
EXIT
Mais recursos
- TaskKill
- Robocopy
-
mklink /?
Creates a symbolic link. MKLINK [[/D] | [/H] | [/J]] Link Target /D Creates a directory symbolic link. Default is a file symbolic link. /H Creates a hard link instead of a symbolic link. /J Creates a Directory Junction. Link Specifies the new symbolic link name. Target Specifies the path (relative or absolute) that the new link refers to.