I'm learning through trying to make things and today I'm trying to get a program to give in bytes the total size of a directory, then display it's size. So from what I have read online, I kind of understand what is going on up until the point of printing the data. Obviously I know it's wrong as it's not working.
Any help would be really appreciated, thank you !
#!/usr/bin/env python
import os
folder = raw_input("Folder Path : ")
folder_size = 0
for (path, dirs, files) in os.walk(folder):
for file in files:
filename = os.path.join(path, file)
folder_size += os.path.getsize(filename)
print ("Folder Size = ") + (folder_size)