problem with glob in remote directory or os.walk in remote directory in windos

lameck kassana lkassana at gmail.com
Fri Feb 27 11:17:28 CET 2009


At last i did it it was this wrong line file_count += len(files) ---it
supposed to be  file_count+=1
but thanks for help ya python masters .Steven Holden ,,,, thanks very very
much for your tip about raw string

On Fri, Feb 27, 2009 at 12:43 PM, Gabriel Genellina
<gagsl-py2 at yahoo.com.ar>wrote:

> En Fri, 27 Feb 2009 07:02:57 -0200, lameck kassana <lkassana at gmail.com>
> escribió:
>
>  now it is working but i wonder it brings higher number of count as if it
>> counts files in wholes computer can you check in my code and correct me
>> ------------------------------------------------
>> import glob
>> import os
>>  file_count=0
>> for files in
>> glob.glob(r"\\192.168.0.45\loader\Files\file_log\v20090225<file://
>> 192.168.0.45/loader/Files/file_log/v20090225>
>> *"):
>>
>
> Add this line:
>       print files
>
>      file_count += len(files)
>> print 'Found', file_count, 'files in cwd'
>>
>> --------------------------------------------------------------------------------------------------------------------------------
>>
>> the results are Found 435656 files in cwd  --which is impossible since
>> files
>> are around six thousands daily.
>>
>
> --
> Gabriel Genellina
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090227/8ecfd189/attachment.html>


More information about the Python-list mailing list