Add/Update an attribute of a directory in Windows 10 using python

263 Views Asked by At

I want to update the Length attribute of a directory in windows 10 using python. How can I do it?

For example, consider the following image:

enter image description here

I want to update the Length attribute of Folder 1, Folder 2, etc., or add a new attribute called, let's say, Duration.

Is it possible to achieve this using python?

1

There are 1 best solutions below

2
On

I did a quick search and length displays the time (hours, minutes & seconds) of a media file. Length doesn't apply to folders.

length example image