i am making a report of server utilisation./now there are many servers and for each server there is a txt file in a certain dir loc of that server. user will call the server by the name and the text file will be called from its respective location how to do ..plzz help

Recommended Answers

All 3 Replies

You would need a service running on each server and you would have to call the service to feed you the text file. Or you can use the UNC path for each server to where the file is but you will have to have permissions to access the folder and file.


Good Luck

how will i do these can u just tell me,..

UNC Path

\\servername\sharename\filename

Private Sub MySub(FileToRead As String)

On Error GoTo MySubError

Dim FName As String, FNumb As Integer

'first check to see if local file exists and if so kill it
If Dir(App.Path & "\temp.txt") <> "" then Kill App.Path & "\temp.txt"

'save network resources and other problems that may arise from opening a file across the network by copying the file locally
CopyFile FileToRead, App.Path & "\temp.txt"

FName = App.Path & "\temp.txt"
FNumb = FreeFile

Open FName For Input As #FNumb
Do While Not EOF(#FNumb)
  '....
Loop

Close #FNumb

Kill FName

Exit Sub
MySubError:

'error handler here

End Sub

Or something like that...


Good Luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.