# Media and File Paths

By default all file commands will attempt to load from the media folder included with the app. However, the root of the AGK file system starts at the app's executable location which you can access using

    SetFolder( "/" )

    agk::SetFolder( "/" );

and you can reset this path back to the media folder by using

    SetFolder( "/media" )

    agk::SetFolder( "/media" );

Using a forward slash at the beginning of any file path will start from AGK's root folder path, otherwise the path will be in addition to the current folder. For example

    LoadImage( 1, "MyImage.png" ) // will attempt to load "/media/MyImage.png"

    LoadImage( 1, "MyImage.png" ) // will attempt to load "/media/MyImage.png"

    SetFolder( "/" )
    SetFolder( "media" )
    SetFolder( "images" )
    LoadImage( 1, "MyImage.png" ) // will attempt to load "/media/images/MyImage.png"

    agk::SetFolder( "/" );
    agk::SetFolder( "media" );
    agk::SetFolder( "images" );
    agk::LoadImage( 1, "MyImage.png" ); // will attempt to load "/media/images/MyImage.png"

    SetFolder( "/" )
    SetFolder( "media" )
    SetFolder( "images" )
    LoadImage( 1, "/media/MyImage.png" ) // will attempt to load "/media/MyImage.png"

    agk::SetFolder( "/" );
    agk::SetFolder( "media" );
    agk::SetFolder( "images" );
    agk::LoadImage( 1, "/media/MyImage.png" ); // will attempt to load "/media/MyImage.png"