def createDocumentsFile(): global _DocumentsPaths FileHandler.readDirectories("Geografia") FileHandler.writeFile("Documentos.txt", "") path = FileHandler.nextFile() while path != None: FileHandler.writeFileAppend("Documentos.txt", str(FileHandler.getActualFile()) + "\t\t" + path + "\n") _DocumentsPaths.append(path) path = FileHandler.nextFile() print("Documents file created")