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

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri Feb 27 04:43:48 EST 2009


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




More information about the Python-list mailing list