Velocity Reviews - Computer Hardware Reviews

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

Thread Tools

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

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

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 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