def trash_move(src, dst, topdir=None):
    filename = op.basename(src)
    filespath = op.join(dst, FILES_DIR)
    infopath = op.join(dst, INFO_DIR)
    base_name, ext = op.splitext(filename)

    counter = 0
    destname = filename
    while op.exists(op.join(filespath, destname)) or op.exists(op.join(infopath, destname + INFO_SUFFIX)):
        counter += 1
        destname = '%s %s%s' % (base_name, counter, ext)

    check_create(filespath)
    check_create(infopath)

    os.rename(src, op.join(filespath, destname))
    f = open(op.join(infopath, destname + INFO_SUFFIX), 'w')
    f.write(info_for(src, topdir))
    f.close()
dataset/ETHPy150Open JT5D/Alfred-Popclip-Sublime/Sublime Text 2/Default/send2trash/plat_other.py/trash_move/original