如何通过终端复制文件夹及其子文件/子文件夹?
Hey there! No need to apologize at all—terminal commands can feel intimidating when you’re used to point-and-click interfaces, but we’ll get this done smoothly. Let’s break down the steps to copy your 55GB game from the external drive to your internal drive without using extra bandwidth.
Step 1: Open PowerShell (Recommended)
First, launch PowerShell—it’s more robust for large file transfers than Command Prompt. Here’s how:
- Press
Win + Xon your keyboard - Select Windows PowerShell (or Windows Terminal > PowerShell if you have it installed)
- If you hit permission issues later, right-click and choose Run as administrator
Step 2: Lock Down Your Source & Target Paths
You’ll need two specific paths to run the copy command:
- Source Path: The folder on your external drive where the Windows Store game is saved. For example, if your external drive is
D:and the game folder is namedMyBigGame_1.0.0.0_x64__abc123, your source path would be"D:\WindowsApps\MyBigGame_1.0.0.0_x64__abc123"(quotation marks are critical if there are spaces in the path). - Target Path: The default Windows Store apps folder on your internal drive, which is almost always
"C:\Program Files\WindowsApps"
Tip: To find the exact game folder on your external drive, open File Explorer, navigate to the external drive, look for the
WindowsAppsfolder, and locate the folder matching your game’s name (it might have a weird suffix with numbers/letters—this is normal for Windows Store apps).
Step 3: Use Robocopy for Reliable File Transfer
We’ll use robocopy (Robust File Copy), a built-in Windows tool made for large transfers—it handles subfolders, retries on errors, and preserves important file attributes like permissions and timestamps.
First, Preview the Copy (Optional but Safe)
Run this command to see exactly what will be copied without moving any files:
robocopy "YOUR_SOURCE_PATH" "YOUR_TARGET_PATH" /E /COPYALL /R:3 /W:5 /L
/L: Runs in "list only" mode (no actual copying)/E: Copies all subfolders, including empty ones/COPYALL: Preserves all file attributes (critical for Windows Store apps to work)/R:3: Retries 3 times if a file fails to copy/W:5: Waits 5 seconds between retries
Run the Actual Copy Command
Once you’ve confirmed the preview looks correct, remove the /L parameter and run:
robocopy "YOUR_SOURCE_PATH" "YOUR_TARGET_PATH" /E /COPYALL /R:3 /W:5
Let the command run—since it’s a 55GB game, it might take a while depending on your drive speeds. You’ll see progress updates in the terminal as it works.
Step 4: Finalize the Game Setup
After the copy finishes, open the Microsoft Store, go to Library, find your game, and click Install. Don’t worry—since all the files are already in place, the Store will just verify them and link the game to your system instead of re-downloading it.
Troubleshooting Quick Fixes
- Permission Errors: If you get "access denied" messages, close PowerShell and re-open it as administrator.
- Store Still Tries to Download: Double-check that you copied the entire game folder (including all subfolders) and that your source/target paths were entered correctly.
内容的提问来源于stack exchange,提问作者go-away google.

