苹果设备使用Windows电脑同步备份C盘空间足更改到其它盘符目录方法
使用以下命令:
mklink /d "%appdata%\Apple Computer\MobileSync\Backup" "D:\AppleBackup"
方便使用,将以下bat批处理使用记事本保存为applemovebackup.bat双击运行:
@REM Apple更改默认备份位置到D盘下的AppleBackup @ECHO OFF setlocal enabledelayedexpansion set "AppleBackup=D:\AppleBackup" set "folderPath=%appdata%\Apple Computer\MobileSync\Backup" for /f "tokens=4" %%a in ('dir /a "%folderPath%\.." 2^>nul ^| findstr /i "<SYMLINKD>"') do set folderPathd=%%a for /f "tokens=5" %%a in ('dir /a "%folderPath%\.." 2^>nul ^| findstr /i "<SYMLINKD>"') do set AppleBackupd=%%a if defined folderPathd ( echo 文件夹软链接指向已经存在: echo "!folderPathd! >>> !AppleBackupd!" set /p choice="输入y回车将直接删除该文件夹软链接并重新建立到新位置!AppleBackup!,否则退出程序?(y/n)": if /i "!choice!" NEQ "y" ( echo 操作已取消。 Goto End ) else ( rmdir /s /q "%folderPath%" if not exist "%AppleBackup%" mkdir "%AppleBackup%" mklink /d "%folderPath%" "%AppleBackup%" echo. echo Apple备份文件夹已成功指向到%AppleBackup%。 Goto End ) ) if exist "%folderPath%" ( set size=a for /f "tokens=3" %%a in ('dir /a/s "%folderPath%" 2^>nul ^| findstr /i "File(s)"') do set size=%%a if "!size!"=="a" for /f "tokens=3" %%a in ('dir /a/s "%folderPath%" 2^>nul ^| findstr /i "文件"') do set size=%%a if "!size!"=="a" set size=0 rem 去除size中的逗号 set "size=!size:,=!" set /a sizeMB=size/1048576 echo 备份文件夹已存在,大小为 !sizeMB! MB。 echo 是否删除Apple在C盘的备份文件夹,如果以前有备份,请先查看是否有文件: echo %folderPath% set /p choice="输入y回车将直接删除该目录?(y/n)": if /i "!choice!" equ "y" ( rmdir /s /q "%folderPath%" if not exist "%AppleBackup%" mkdir "%AppleBackup%" mklink /d "%folderPath%" "%AppleBackup%" echo. echo Apple备份文件夹已成功指向到%AppleBackup%。 ) else ( echo 操作已取消。 ) ) else ( if not exist "%AppleBackup%" mkdir "%AppleBackup%" mklink /d "%folderPath%" "%AppleBackup%" echo. echo Apple备份文件夹已成功指向到%AppleBackup%。 ) endlocal :End Pause
或者直接下载bat文件,双击运行:
Apple更改默认备份位置到D盘下的AppleBackup.bat