function directory = split_file(path)
    i=length(path);

    while(i>=1)
        if(path(i)=='\')
            break;
        end
        i=i-1;
    end
    j=1;
    directory='';
    while(j<=i)
        
        directory=strcat(directory,path(j));
        j=j+1;
    end

end
