Why Doesn't XP Pro Show Size, Time and Date Mod of a Created File?

Gerhard Häring gh at ghaering.de
Tue Dec 8 03:04:22 EST 2009


W. eWatson wrote:
> I created a folder, and wrote a file to it. When I look at what files
> are in it, they are correct. However, The Size, Type, and Date Mod are
> not shown. Why am I missing those columns? I'm writing files with a
> suffix of dat, which seem only to match up with video CD movie.

That's probably a Windows Explorer thing. The column may be hidden or
moved away to the far right.

As far as Python is concerned, you can fetch this kind of information
with the stat() function of the os module.

import os, time
stat_info = os.stat("x")
print "size:", stat_info.st_size
print "modification time:", time.strftime("%Y-%m-%d %H:%M",
time.localtime(stat_info.st_mtime))

-- Gerhard




More information about the Python-list mailing list