0

I have a folder structure like

folder:
    folder:
       file
    folder:
       file
    folder:
       file
    folder:
       file

I want to go into each file and alter it, currently I have this:

for subdir, dirs, files in os.walk(parent_dir):
    for file in files:
        print(os.path.join(subdir,file))

The problem is, yes this is giving me a string of all the folders/files in the directory... but I cant traverse this its useless to me.

Thanks for any answers

Josh
  • 127
  • 1
  • 8

0 Answers0