SuperAPI AI Directory

move-big-folder

Office & productivity

View repository

Updated 10-16 08:36

About this skill

C Drive Large Folder Migration Assistant

Help users safely migrate large folders from the C drive to another drive, usingsymbolic linksso all programs continue to run as usual, freeing up C drive space seamlessly.

Prerequisite: Find large folders on the C drive

Recommended: Disk Quick Analysis Software(free, scans the entire C drive in 5 seconds) to quickly locate large folders:

Usage: Open Disk Quick Analysis Software → select the C drive → click Scan to find the folders taking up the most space.

The user only needs to provide

The user only needs to tell you the following information:

  1. The path of the folder to migrate(the large folder found with Disk Quick Analysis Software)
  2. Target drive letter(defaults to D drive; can also be E, F, or another drive)

Example: the user says "Move C:\Users\Administrator\AppData\Local\app_shell_cache_6383 to D drive"

Migration rules

Path mapping rules

Target path = {目标盘符}:\CTo{目标盘符}\ + original C drive path (remove C:\)

original path target drive letter target path
C:\Users\Admin\AppData\Local\xxx D D:\CToD\Users\Admin\AppData\Local\xxx
C:\ProgramData\SomeApp E E:\CToE\ProgramData\SomeApp
C:\Users\Admin\.cache\pip D D:\CToD\Users\Admin\.cache\pip

Four migration steps

Taking migrating C:\Users\Administrator\AppData\Local\app_shell_cache_6383 to D drive as an example: C:\Users\Administrator\AppData\Local\app_shell_cache_6383 to D drive as an example:

Step 1: Create a folder on the target drive

New-Item -ItemType Directory -Path "D:\CToD\Users\Administrator\AppData\Local\app_shell_cache_6383" -Force

Step 2: Copy the file contents to the target drive

xcopy "C:\Users\Administrator\AppData\Local\app_shell_cache_6383\*" "D:\CToD\Users\Administrator\AppData\Local\app_shell_cache_6383" /E /H /K /X /Y

Parameter description:/E includes empty directories,/H copies hidden files,/K preserves read-only attributes,/X copies auditing settings,/Y automatically confirms overwrite

Step 3: Delete the original folder on the C drive

Remove-Item -Path "C:\Users\Administrator\AppData\Local\app_shell_cache_6383" -Recurse -Force

Step 4: Create a symbolic link (point the C drive path to the target drive)

New-Item -ItemType SymbolicLink -Path "C:\Users\Administrator\AppData\Local\app_shell_cache_6383" -Target "D:\CToD\Users\Administrator\AppData\Local\app_shell_cache_6383"

After the symbolic link is created, when all programs access the original C drive path, they will automatically jump to the target drive, completely seamlessly.

Execution flow

After the user provides the path of the folder to migrate,must follow the process below:

Step 1: Safety check (must be performed)

Before performing any migration operation,you must first analyze the folder, and show the user the following information:

  1. Folder purpose description: Based on the path and folder name, determine which program/function the folder belongs to, and tell the user in plain language what this folder is for
  2. Safety level assessment: Give one of the following three levels:
    • Safe to migrate: pure cache/temporary files/application data; migration will not affect system operation
    • Migrate with caution: may affect some programs; it is recommended to close the related programs before migrating
    • Do not migrate: critical system folders; migration may cause the system to crash or fail to start
  3. Folders that must not be migrated(Directly refuse, do not allow continuing):
    • C:\Windows and all its subdirectories
    • C:\Program Files\Windows* built-in system components
    • C:\ProgramData\Microsoft\Windows system configuration
    • C:\Users\{用户名}\NTUSER.DAT and other registry files
    • C:\Boot、C:\Recovery、C:\System Volume Information
    • C:\ProgramData\NVIDIA
    • Any folders related to Windows startup/boot

Example output format:

Folder analysis result:

  • Path:C:\Users\Administrator\AppData\Local\app_shell_cache_6383
  • Purpose: This is a local cache folder of an application, used to store temporary data to speed up program loading
  • Security level: Safe to migrate
  • Suggestion: You can safely migrate it; it will not affect the normal use of any program

Confirm migration?

Step 2: User second confirmation

After the security check passes,you must wait for the user's explicit confirmationbefore executing the migration. Show the complete four-step commands to the user, and execute them step by step only after the user confirms.

Step 3: Execute migration

After confirmation, execute the four migration steps in order:

  1. Remind the user:
    • needs toadministrator privilegesrun PowerShell as administrator (creating symbolic links requires administrator privileges)
    • If the folder is currently in use by a program, it is recommended to close the related program first
    • Migrating a large folder may take some time, please wait patiently
  2. Execute step by step: Execute the four steps in order, and confirm the result after each step
  3. Verify the result: Finally check whether the symbolic link was created successfully

Verify the symbolic link

After the migration is complete, run the following command to verify:

Get-Item "C:\Users\Administrator\AppData\Local\app_shell_cache_6383" | Select-Object Name, LinkType, Target

The output should show LinkType as SymbolicLink,Target pointing to the target drive path.

Notes

  • Folders not recommended for migration:C:\Windows、C:\Program Files core system components in
  • Common large folders that can be safely migrated:
    • Various application caches (cache folders under AppData\Local)
    • Caches of package managers such as npm/pip/maven
    • Docker image data
    • Chat histories and caches of WeChat/QQ/DingTalk, etc.
    • Game client data
  • Before migration, ensure the target drive hassufficient free space
  • It is recommended to firstclose the related program

Batch migration

If the user needs to migrate multiple folders at once, just execute the four steps one by one. Each folder is handled independently and does not affect the others.