Advertisement
Guest User

Untitled

a guest
Jun 21st, 2022
16
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. row = 1
  2. for root, dirs, files in os.walk(self.direc):
  3.     for dir_name in dirs:
  4.         data_sheet.write(row, 0, fr'{root}\{dir_name}/')
  5.         row += 1
  6.  
  7.     for file in files:
  8.         data_sheet.write(row, 1, file)
  9.         row += 1
Advertisement
RAW Paste Data Copied
Advertisement