Untitled

                Never    
import os
import shutil


def change_dir():
    print('#'*100, '')
    print('.\n..')
    for files in os.listdir(os.getcwd()):
        print(files)
    print('#'*100)

    user_input = input(os.getcwd() + ' >>> ')
    return user_input


def download_file(file, src):
    try:
        shutil.copyfile(os.getcwd() + '\\' + file, src + '\\' + file)
    except (FileNotFoundError, PermissionError) as err:
        print(err)
    return


def commands(cmd, src):
    if cmd == '/quit':
        raise SystemExit
    elif cmd == '/source':
        os.chdir(src)


if __name__ == '__main__':
    source = os.getcwd()
    while True:
        direct = change_dir()
        if direct.startswith('cd '):

            try:
                os.chdir(direct[3:])
            except FileNotFoundError as e:
                print(e)
            except NotADirectoryError:
                if os.path.isfile(os.getcwd() + '\\' + direct) is True:
                    os.popen(direct)
                
        elif direct.startswith('dl '):
            download_file(direct[3:], source)
        elif direct.startswith('/'):
            commands(direct, source)

Raw Text