English | 中文
Please consider giving this project a Star before use. Thank you for your support! 🌟
This project provides a Windows GUI/CLI tool to move LM Studio’s models and data directory from its default location to another drive, and create a directory junction at the original path. After migration, LM Studio can still access the content via the original path, saving space on the system drive without affecting user experience.
- Move
%USERPROFILE%\.lmstudioto another drive (default suggestion:D:\LMstudio_AIModels). - After copying, automatically remove the source directory and create a junction at the original path pointing to the target.
- If the target directory already exists, choose to delete and overwrite, or skip copying and only create the junction.
- Offer both a GUI and a CLI mode.
- Prefer
robocopyfor fast copying; when unavailable, fall back to Python copying. - Pre-execution reminders and checks: whether running as Administrator, and whether LM Studio is fully closed.
- Windows only (Windows 10/11).
- Python 3.10+ (Tkinter is typically included on Windows).
move_lmstudio.py: Main tool (supports both GUI and CLI).movefile.bat: Legacy batch script (no longer necessary).
- Run as Administrator (creating a directory junction requires elevated privileges or Developer Mode).
- Make sure LM Studio is fully closed (including tray and background processes).
- Consider backing up important data.
- Open PowerShell or CMD as Administrator.
- Navigate to the project directory.
- Run:
python move_lmstudio.py --gui- In the GUI:
- Set Source (default:
%USERPROFILE%\.lmstudio). - Set Target (default:
D:\LMstudio_AIModels). - Optional:
- "Delete and overwrite if target exists".
- "Skip copy, only create junction at source path".
- Click "View Info" to inspect directory stats.
- Click "Start" and confirm prompts.
- Set Source (default:
- Open PowerShell or CMD as Administrator.
- Run:
python move_lmstudio.py --cli- Follow the prompts:
- Enter/confirm source and target paths.
- If the target exists, choose from re-enter, delete & overwrite copy, link-only, or exit.
- Confirm that you’re running as Administrator and LM Studio has been fully closed.
- Source:
%USERPROFILE%\.lmstudio - Target:
D:\LMstudio_AIModels(Both can be customized in GUI or CLI.)
- Copy: Fully copy the source directory to the target (
robocopypreferred; if unavailable, Python fallback). - Remove source: After a successful copy, remove the source directory (free up system drive).
- Create junction: Create a junction at the original source path pointing to the target, so LM Studio keeps using the original path.
- Cannot create junction / permission errors:
- Run the terminal as Administrator, or enable "Developer Mode".
- Ensure the target path is accessible, and the source path is available for junction creation after deletion.
- Target directory already exists:
- Choose "Delete & overwrite copy" in CLI, or check the corresponding option in GUI.
- Or choose "Link-only" to use the existing target without copying.
- Copy is slow:
- Ensure
robocopyis available (bundled with Windows). - Python fallback copying is expected to be slower.
- Ensure
- LM Studio still holds files:
- Fully close LM Studio including tray and background processes, then retry.
- When using "Delete & overwrite", the specified target directory will be removed first. Double-check paths.
- Back up important data beforehand.
- To revert, remove the junction at the source path and copy data back; or set the target back to the original path in the tool and run again.
This tool is provided as-is, without warranties or liabilities.