There's a directory : /home/zurelsoft/files
with the file names .sachitadhFebruary28,2013,18:45PMsolexa.zip.M9mw9e
There are lots of files like this:
.sachitadhFebruary28,2013,18:45PMsolexa.zip.M
.sachitadhFebruary28,2013,18:45PMsolexa.zip.KK
which are stored in a database.
current_file = Queue.objects.all()
j = [i.file_session for i in current_file]
k = [str(i) for i in j]
new_file_size = [int(os.path.getsize(i+'*')) for i in k]
I am trying to get the filsize like this but I am getting No such directory error.
I found glob.glob()
used that but didn't work. How can I do this?