Skip to content

Instantly share code, notes, and snippets.

@remino
Last active March 31, 2024 02:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save remino/d831ee0d0624ff6be2c805eb2bbae6cc to your computer and use it in GitHub Desktop.
Save remino/d831ee0d0624ff6be2c805eb2bbae6cc to your computer and use it in GitHub Desktop.
Nintendo Switch: Copy files from old microSD card to new microSD card

Nintendo Switch: Copy files from old microSD card to new microSD card

I'm frustrated every time I upgrade my microSD card in my Nintendo Switch, because no matter what I did before writing the switchcp.bat batch file, nothing seemed to work. Everything I'd do would eventually make a microSD card unreadable by my Switch.

After toying around with this problem for hours, below are some conclusions I've drawn. I can't take responsability for any data loss or damage to your systems. However, I do hope they can help you:

  • Don't copy your files using macOS or Linux. This is a big one. The ExFAT file system used by microSD cards of large capacity (microSDHC or microSDXC) is a proprietary file system by Microsoft. No matter how much licencing was negotiated between OS makers or how much backward engineering was done, only Windows seems to get reading and writing files on ExFAT file systems right. As a Mac user, I was determined to use macOS to do the job, until I tried with a Windows VM and saw all my problems vanished. The main problem seems to be when new folders are created: oddly enough, if a new folder is created in macOS, it is not readable or writable by the Nintendo Switch. (Not sure about Linux.)

  • No matter how much your memory card can hold, the Switch will only support up to 1,000 video files on it. Might be something you want to keep in mind if you're considering buying a new memory card.

  • No matter how well you copy your files, you will always have to redownload all the software. Yes, if a microSD card is in your Nintendo Switch and you download games, they will be stored on your memory card in /Nintendo/Contents. But if you transfer memory cards, don't bother copying that folder; all the software will have to be redownloaded no matter what.

  • Use the Nintendo Switch to format your microSD card. Nintendo recommends the SD Memory Card Formatter. That didn't seem to help on macOS. You're better off using the Nintendo Switch to format your microSD card.

  • Back up your files. No matter what you do, it's a good idea to back up the Album and save folders found in the Nintendo folder of your memory card first. Don't bother copying Contents: as mentioned above, that folder contains the downloaded software and is always cleared before using a new memory card.

  • Use switchcp.bat to copy files. I wrote a batch file for Windows which you can use to copy files between two memory cards. Or, if you need to, you can use the script to copy the files from your old card to the hard drive, then from the hard drive to your new card. It works by creating new folders instead of copying them as is, as doing the latter could carry over metadata that would render the folders unusuable on the Switch. Then, the files are copied within. To use it:

    • Save switchcp.bat on your Desktop.
    • Open the Command Prompt: search for cmd in the Start Menu.
    • Change into the Desktop folder: type cd Desktop then press Enter.
    • Run the script without arguments for more instructions: type switchcp.bat without arguments then press Enter.

Hope the above helps your upgrade to a bigger card. If you have any questions, please comment below. Feel free to also submit patches.

Happy gaming!

@@echo off
rem
rem switchcp.bat
rem
rem Written by: Remino <remi@remino.net>
rem Written on: 2019-03-04
rem
rem Prepare new microSD card for the Switch by recreating
rem the directory structure and copy the files from the source
rem directory to the destination directory.
rem
rem Tested only on Windows 10.
rem
rem Disclaimer: I assume no responsability. Use this script
rem at your own risk.
rem
setlocal enableextensions enabledelayedexpansion
if [%2]==[] goto usage
set dir=
set "source=%1"
set "dest=%2"
call :copy %source%
for /f %%d in ('dir /a:d /b /o:n /s %source%') do call :copy %%d
goto end
:copy
set "from=%1"
set "to=!from:%source%=%dest%!"
echo === %from% =^> %to%
if not exist %to% mkdir %to%
if not exist %to% goto failed
copy /y %from%\* %to%\
goto :EOF
:failed
echo Failed to create directory or to copy files within. Aborting.
goto :EOF
:usage
echo Usage: switchcp.bat source dest
echo Example: switchcp.bat D:\Nintendo F:\Nintendo
echo.
echo Prepare new microSD card for the Switch by recreating
echo the directory structure and copy the files from the source
echo directory to the destination directory.
echo.
echo WARNING: This will override files already on the card.
echo.
echo Also, interrupting and restarting the process will restart it
echo from the beginning. There is no resume.
echo.
goto end
:end
@remino
Copy link
Author

remino commented Mar 31, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment