473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Finding out if a computer is connected to the network

Iv developed a small program that looks for a file over our network, and copy it to the location of another computer. Im using the "If FileExists("\\oldpc\main share\Folder\file.txt") Then" way of finding if the file exists, but i want to make it so that it tries to look for the computer, not the file. At the moment this is how i am finding and copying the file:

If FileExists("\\oldpc\main share\Folder\file.txt") Then
FileCopy "\\oldpc\main share\Folder\file.txt", "C:\Documents and Settings\All Users\Desktop\back ups\file.txt"
else
msgbox "Error"
end if

Public Function FileExists(Fname As String) As Boolean

If Fname = "" Or Right(Fname, 1) = "\" Then
FileExists = False: Exit Function
End If

FileExists = (Dir(Fname) <> "")

End Function

Instead of finding the file, i want it to find the PC, because, although the PC is connected, the file might not be at the location specified so it errors, and i want TWO different error messages. 1 saying the file is not at location, and 1 saying the computer is unable to be located. Can anyone help?
Sep 15 '06 #1
0 1853

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Mickel Grönroos | last post by:
Hi all, I have a silly question. Is there are simple way to check if the computer is connected to the Internet? It seems this should be a pretty straight-forward thing to do, but as I am totally...
23
by: anton.vredegoor | last post by:
Here's my situation: I'm typing this in a public library on a computer with OS windows 2000 server. I can run Internet explorer, word, excel and powerpoint, that's it. Maybe java, but it seems...
7
by: Jason Reichenbach | last post by:
I've GOT to be missing something painfully obvious, here... I need to programmatically get the full human name of the current user on a local system, the same system upon which the app is...
4
by: Goh | last post by:
Hi, I would like to know how can we implement a web page that intelligent enough to unique identify that pc have been visit before without any cookies and login user require. I have try...
2
by: Dawoodi Bohra | last post by:
VPN connected but cannot map folders on my computer. I am trying to connect to our headquarters server using VPN (windows XP). I am able to successfully connect to the server (passes...
0
tjc0ol
by: tjc0ol | last post by:
Hi guys, I'm a newbie of this stuffs, We had a small office network (1 Windows 2K - Server) and (3 Windows XP - Client). I am testing to 1 PC (Windows 2K) installed with Licensed Wingate...
5
by: garks | last post by:
Is there any way to know the computer is connected to a router? I know using WebRequest is one of the method, but WebRequest need router's URL , username and password. I don't know those...
1
by: Glenton | last post by:
Hi All Here is a very simple little class for finding a shortest route on a network, following Dijkstra's Algorithm: #!/usr/bin/env python #This is meant to solve a maze with Dijkstra's...
5
Airslash
by: Airslash | last post by:
Hello, I'm not into neworking, but I was wondering if the following is possible: We have a computer connected to various IP Cameras in the network. These cameras can assign themselves a default...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.