Organize Games on Mig Switch

  • Thread starter Thread starter TheDuke3x2
  • Start date Start date
  • Views Views 921
  • Replies Replies 6
  • Likes Likes 2

TheDuke3x2

New Member
Newbie
Joined
Apr 11, 2026
Messages
3
Reaction score
4
Trophies
0
Age
34
XP
62
Country
United States
Hello All,
Wanted to share something I had discovered. Apologies if this is already documented somewhere else. But It is possible to sort your games on your Mig using an ExFat Card if that is something you would like to attempt. Normally the order is FIFO (first in first out) in the order added to the SD Card, but it can be organized alphabetically (allowing you to rename the folders if you have a specific order you want). This process was done using WSL (Windows Subsystem for Linux), but Linux is the key here, so it can be done on linux OS's. Basically use Fatsort to sort the directory entries on the sdcard filesystem.

Before

1775918819939.png


After

1775919138580.png

FATSORT - SD CARD ALPHABETICAL SORTING
=======================================


PREREQUISITES SETUP (one time only)
-------------------------------------

1. Install Ubuntu on WSL
(in PowerShell as Administrator)
wsl --install -d Ubuntu
- Follow prompts to create a username and password
- Set Ubuntu as the default WSL distribution:
wsl --set-default Ubuntu

2. Install usbipd on Windows
(in PowerShell as Administrator)
winget install usbipd

3. Find your SD card hardware ID
(in PowerShell as Administrator)
usbipd list
- Look for "USB Mass Storage Device" and note the VID: PID value
- Example: 14cd:125d <-- yours may differ, note it down

4. Install fatsort and exfat support in Ubuntu
(in Ubuntu WSL)
sudo apt update
sudo apt install exfat-fuse exfatprogs fatsort

5. Create the mountpoint directory
(in Ubuntu WSL)
sudo mkdir /mnt/sdcard


---


STEPS (each time)
------------------

1. Plug in SD card

2. Open PowerShell as Administrator and find your SD card hardware ID:
usbipd list
- Look for "USB Mass Storage Device" and note the VID: PID (e.g. 14cd:125d)

3. Attach to WSL:
usbipd attach --wsl --hardware-id <VID: PID>
(replace <VID: PID> with value from step 2, e.g. 14cd:125d)

4. Open Ubuntu WSL and find your SD card device:
lsblk
- Look for a disk matching your SD card size, note the partition name
- Example: sdf1 <-- yours may differ

5. Mount the card:
sudo umount /dev/<partition>
sudo fuser -k /dev/<partition>
sudo mount.exfat-fuse /dev/<partition> /mnt/sdcard
(replace <partition> with value from step 4, e.g. sdf1)

6. Verify order BEFORE sorting:
ls -Uf /mnt/sdcard

7. Unmount and run fatsort:
sudo umount /dev/<partition>
sudo fatsort -n /dev/<partition>

8. Verify order AFTER sorting:
sudo mount.exfat-fuse /dev/<partition> /mnt/sdcard
ls -Uf /mnt/sdcard

9. Clean up:
(in Ubuntu WSL)
sudo umount /dev/<partition>

(in PowerShell)
usbipd detach --hardware-id <VID: PID>

10. Unplug SD card


---


NOTES
-----
- Always verify your SD card device name with lsblk and hardware ID with
usbipd list each time, as they can change depending on what else is plugged in
- fatsort may show an error on "System Volume Information" - this is a
Windows system folder and can be ignored
- ls -Uf shows files in raw directory entry (FIFO) order, not alphabetical,
so if it looks alphabetical after fatsort it worked correctly
- macOS ls -U does NOT show true FIFO order (it uses BSD tools, not GNU),
so always verify in Ubuntu WSL
 
@mathew77 ,not directly that I could perform. These steps I detailed are on windows using WSL. WSL is a feature that allows users to run a Linux environment—including command-line tools, utilities, and applications—directly on Windows.
 
  • Like
Reactions: mathew77
Have you tested this?

 
For Mac, you can use https://fat-drive-sorter.netlify.app/ - Make sure to copy to applications folder and then control key + right click open, and inside system settings: add the application (with the + icon) to Full Disk Access in the Privacy & Security settings.

Using the app you will be able to sort the games by alphabetical order.
So if you want a custom order, for example based on which games you play right now, you can just rename the start of each folder to 01, 02, etc for your desired order.

If you're like me and have a lot of games, I recommend doing the following to automate things:

1. Export a list of all games as a simple list using the following command in terminal:
find "/Volumes/SDCARD" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; > ~/Desktop/folder_list.txt
Change SDCARD to the exact name of your SD card. (You may of course change "Desktop/folder_list.txt" to another directory and name of the text file if you wish)

2. With this list of folder names inside the text file that you just generated, you create a sheet in Google Sheets where you simply paste them into, from cell A1 for example. (Make sure to ignore any non .xci folders if there is any, dot files for example (see last couple of paragraphs on how to disable any problematic ones).

3. Reorder the cells in any way you want, up or down rows. I recommend you can take notes in the neighbouring columns to help out with the your selection and priority process, for example ordering by genre, local multiplayer, personal ratings, playcount, etc. Simply sort based on these variables to create a whole new order for your games.

4. In the cell next to one of the folder names (B1 for example), you paste the following formula:
="mv ""/Volumes/SDCARD/" & A1 & """ ""/Volumes/SDCARD/" & TEXT(ROW(), "00") & "_" & A1 & """"
Change SDCARD to the exact name of your SD card, and A1 if your list starts in a different cell.

5. Now drag the bottom-right blue corner dot down to the end of your list in the spreadsheet to make the formula do it's magic for each and every cell with your folder names in them, automatically generating terminal commands to have them change name, starting with numbers so that FatDriveSorter can sort your SD card in alphabetical order and still keep your custom order.

6. Select all cells in the column of formulas (From B1 to B69 for example) and copy
(Each cell should look something like this for example: mv "/Volumes/SDCARD/Mario Kart 8 Deluxe.xci" "/Volumes/SDCARD/01_Mario Kart 8 Deluxe.xci" All the way down to your last game in the list with the highest number, for example 69_Cuphead.xci)

7. Paste the copied text into the terminal and hit enter. Terminal will now automatically change the name of your folders inside your SD card to match an alphabetical order that matches the order you desire (step 3).

8. Open up FatDriveSorter, select the drive (your SD card, which should be auto selected) and click on Sort.

9. Eject the SD card from your Mac and pop it back into the MIG Switch to enjoy the new order based on your own preference! 🎉

----
Last couple of paragraphs:

If you're transferring games using a Mac, make sure to disable dot files using the following command in the terminal:
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
This will make sure you're not generating any .foldername.xci ghosts of your game folders, which makes the MIG Switch not function properly.

And to view the invisible files so you can delete them:
Command + Shift + . (period)
This is especially useful against .trash files as they're kept inside the same volume (our SD card) on Mac, hogging up precious space. (Make sure to clear the trash bin while having the SD card directory open in finder, if you regularly delete game folders for example)

----
I hope I made myself abundantly clear in this guide, hit me up if you still have any questions.
 
Last edited by theowest,

Site & Scene News