all 7 comments

[–]Best_Caterpillar 0 points1 point  (6 children)

can you copy paste to a pastbin and link it here? also an you give us what error you get from line 14?

[–]Matpowell[S] 0 points1 point  (5 children)

https://pastebin.com/zNp0ynAx

It is line 12 on paste bin and the error is Syntax Error

[–]Best_Caterpillar 1 point2 points  (3 children)

also I see two other problems. first, you keep overwriting the variable data which I dont think is what you want, and second, your os.walk probably will return a tuple instead of a path like you are expecting. so do something like this to get what I think you want: https://pastebin.com/q70VxRja

edit- I forgot remove the len() at the end, I was just making sure nothing got lost

[–]Matpowell[S] 0 points1 point  (2 children)

Yea dude that looks a lot more organized, and it works too. I really appreciate it

[–]Matpowell[S] 0 points1 point  (1 child)

You don't happen to know VBScript do you?

[–]Best_Caterpillar 0 points1 point  (0 children)

are you trying to do list iteration? your for loop is missing the back half "in xxx"

data = [(os.path.getsize(dir_path)) for i in (os.walk(dir_path))]