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

Discussion in 'Python' started by lameck kassana, Feb 26, 2009.

  1. 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
    today=date.today()
    dir_count, file_count=0, 0

    for files in glob.glob('\\192.168.0.45\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'
    filename="reconciliation.txt"
    file_string= str(file_count)+','+ str(today)+'\n'
    File=open(filename,"a")
    File.writelines( file_string)
    File.close()



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

    can I get help please how can i do that???
    lameck kassana, Feb 26, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Georgy Pruss
    Replies:
    15
    Views:
    723
    Tim Roberts
    Dec 1, 2003
  2. Tim Peters
    Replies:
    1
    Views:
    356
    Duncan Booth
    Dec 1, 2003
  3. Sean Berry

    Question about glob.glob <--newbie

    Sean Berry, May 4, 2004, in forum: Python
    Replies:
    3
    Views:
    345
    David M. Cooke
    May 4, 2004
  4. Elbert Lev

    glob.glob unicode bug or feature

    Elbert Lev, Jul 31, 2004, in forum: Python
    Replies:
    5
    Views:
    392
    Neil Hodgson
    Aug 2, 2004
  5. Hitesh

    glob.glob output

    Hitesh, Mar 12, 2007, in forum: Python
    Replies:
    6
    Views:
    397
    Hitesh
    Mar 13, 2007
Loading...

Share This Page