Virtual SD card tools
Easily create and manage virtual disks on Windows
view on
github

About

The vsd package provides two python scripts which are helpful in automating virtual disk creation, deletion, mounting, and unmounting.

Additionally, it comes with several .bat files which can be double-clicked or executed from the command line to perform the different available commands.

Required software

Download

Example usage

An example of how these scripts can be used is to create a virtual SD card file (sd.raw) for use with Dolphin Emulator, without having to download unnecessary shareware. (see: WinImage)

To use, simply get all the required software, download and unzip the build package into a folder, and then edit the following variables in settings.bat:

To edit SD card contents, run create.bat followed by mount.bat (for subsequent editing, only mount.bat needs to be executed.) Then place any files on the newly added disk under “Computer”. After editing is complete, run unmount.bat to allow other applications read/write access on the virtual SD card file.

Finally, to enable in Dolphin, make sure that “Insert SD Card” is enabled under “Options” -> “Configure” -> “Wii” -> “Device Settings”

Note that the same general setup can be used for other applications with a little tweaking; it's designed to be fairly generic.

Batch files

vsd.py

vsd.py is the main script used for creating, deleting, mounting, and unmounting virtual disk files. It can perform up to 4 of the commands in one execution.

Descriptions of the command line flags and commands follow. Additional info can be obtained by executing vsd.py --usage.

Commands

If multiple commands are specified, they will be executed in the order: --unmount, --delete, --create, --mount.
They are not executed in the order they appear on the command line.

Flags

shortcut.py

shortcut.py is responsible for creating and deleting shortcut. It is designed to be able to create file shortcuts and URI shortcuts as well. It can be used as an imported library, and as such, some of its functionality is not used by the included batch scripts.

Initially, shortcut.py was designed to use the pywin32 extensions to help create shortcuts, but it has problems creating directory shortcuts this way. The code remains in the file, but it is never used.

Command line

The general format of the command line usage is:
shortcut.py [input_arguments] output_filename.lnk target.ext [shortcut_arguments]

Once filename and target have been specified (either by --flagged or flagless arguments,) all remaining arguments are used as the arguments of the shortcut file.

Command line flags

Additional info can be obtained by executing shortcut.py --usage.