Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > i have problem with glob.glob() in remotely directory

Reply
Thread Tools

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

 
 
lameck kassana
Guest
Posts: n/a
 
      02-26-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
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???
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory Nathan Sokalski ASP .Net 2 09-06-2007 03:58 PM
problem: redirect to login page only remotely esqueletoh@gmail.com ASP .Net 2 07-30-2006 01:56 AM
Problem remotely shutting down a windows computer with python EW Python 6 01-07-2005 04:24 AM
Printing Remotely Wireless Networking 0 08-25-2004 02:03 PM
RE: Strange problem running app remotely Jim Cheshire [MSFT] ASP .Net 6 07-22-2004 02:14 AM



Advertisments