rootDir = 'myfolder'
fileSet = set()
for dir_, _, files in os.walk(rootDir):
    for fileName in files:
        relDir = os.path.relpath(dir_, rootDir)
relFile = os.path.join(relDir, fileName)
fileSet.add(relFile)
Python - Get relative path of all files and subfolders in a directory