i have problem with glob.glob() in remotely directory

lameck kassana chelaskk at gmail.com
Thu Feb 26 04:05:06 EST 2009

hey i want to count number of files in remote computer

example of my code is

import glob
import os
import time
from datetime import date
dir_count, file_count=0, 0

for files in glob.glob('\\\files\*.txt'):
      file_count += len(files)
print '----the count of ',today, '-------'
print 'Found', dir_count, 'sub-directories in cwd'
print 'Found', file_count, 'files in cwd'
print 'Found', dir_count + file_count, 'files & sub-directories in cwd'
file_string= str(file_count)+','+ str(today)+'\n'
File.writelines( file_string)

i get zero results since glob.glob( )can not traverse in \\

can I get help please how can i do that???

More information about the Python-list mailing list