# File Operations

### MakeCode Programming Tutorial

#### Extension link: [**https://github.com/KittenBot/pxt-koi2**](https://github.com/KittenBot/pxt-koi2)

Search for KOI2 in the search bar, select KOI 2.(KOI 2 has been approved by Microsoft)

<figure><img src="https://686851495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7Bv9xBdKh3R9w6Vp7asd%2Fuploads%2Fl4LAJvAYYE9RTHdxFSja%2FlALPGTO6sYhE8bbNAo7NBVw_1372_654.png?alt=media&#x26;token=fcce3ddf-c398-4075-9248-bba1b14267cd" alt=""><figcaption></figcaption></figure>

The extension will be imported into your project.

### Coding Blocks

<figure><img src="https://686851495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7Bv9xBdKh3R9w6Vp7asd%2Fuploads%2FvJCSexfYOZXiSNZRWjwg%2Fimage.png?alt=media&#x26;token=665265c6-01bb-419d-872c-b1f50f1a8e8d" alt=""><figcaption></figcaption></figure>

### Sample Program

{% hint style="info" %}
Armourbit users need to use the corresponding initialization block
{% endhint %}

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FPGyECwlPd2M3JqUBLDfO%2Fimage.png?alt=media&#x26;token=662ace3f-a8eb-4fbf-8a10-1d9643c88b1e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Please use microSD card that is class10 or above for KOI.
{% endhint %}

{% embed url="<https://makecode.microbit.org/_UMJXhTMz17Hc>" %}

[Sample Program](https://makecode.microbit.org/_UMJXhTMz17Hc)

#### Sample Program Operations

1. Press Button A on the Micro:bit to display a list of files on the KOI, the list will close after 5 seconds
2. Press Button A+B to copy a file from KOI to SD card.
3. Press Button B to delete a file.
