473,796 Members | 2,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Determine if file is on local PC

I need to determine for sure if a particular fie is on the user's local PC or
on the server. I have the complete path of the file, let's call it

FullFilePath

How can I unequivocally determine if this is on the local PC or on a server
or other machine. The local computer may have more than one hard drive but if
the file is on any of these local hard drives I would want the code to
produce a result that the file is on the local PC. I guess we'll assume that
if the file is on a jump drive or CD that that is not the local PC.

I guess I'm wary of looking for typical hard drive letters in the file path
to make my determination. Is there another way?

Thank you.

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200602/1
Feb 16 '06 #1
2 3478
robert d via AccessMonster.c om wrote:
I need to determine for sure if a particular fie is on the user's local PC or
on the server. I have the complete path of the file, let's call it

FullFilePath

How can I unequivocally determine if this is on the local PC or on a server
or other machine. The local computer may have more than one hard drive but if
the file is on any of these local hard drives I would want the code to
produce a result that the file is on the local PC. I guess we'll assume that
if the file is on a jump drive or CD that that is not the local PC.

I guess I'm wary of looking for typical hard drive letters in the file path
to make my determination. Is there another way?

Thank you.

This may or may not assist.
http://www.mvps.org/access/api/api0003.htm
Feb 16 '06 #2
Ted
When you check out the code at the link salad provided
(http://www.mvps.org/access/api/api0003.htm
), do what I did and modify the code to store that data in a table so
you can refer to it later. It is great code and I have integrated it
with several applications I have created where I need to be able to
determine what type of a drive a particular drive is.
Note in the code that it determines if the drive in question is a
network drive as well.
In one case I adapted that code into an application I created that
searched drives and catalogs the files so that I can search for the
files later. I use it to catalog files I have stored on CD, DVDs,
External HDD, etc. Very useful code!

Feb 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
14619
by: long5120 | last post by:
I am trying to use webpage with javascript to check if a web server is responding. I was thinking of using 2 frames. Frame1 will have the site, and the Frame2 will be a status bar (not really needed). This webpage will call the site's homepage and refresh in 10 seconds. If I can see the homepage then, the site is up, else site is down. I have an example of my code below. My question, is it possible to check the homepage in frame1 (after...
12
7838
by: Sunner Sun | last post by:
Hi, all Since the OS look both ASCII and binary file as a sequence of bytes, is there any way to determine the file type except to judge the extension? Thank you!
8
2232
by: Steven Van Dyke | last post by:
Hi I need a code snippet to determine if my computer is connected to a network or not. There's probably a System.Net function for it, but I cannot find it. Thanks, Steve
1
1703
by: Rubbrecht Philippe | last post by:
Hi there, I developed an application that reeds configuration settings from a central database. Whenever the dataset is read, it's also saved as a local XML file on the machine. Whenever the central server is unavailable, the local file is used to enable offline working. I would like to now what the fastest method is to determine connection
3
6814
by: KSC | last post by:
Hello, Is there a way to programmatically determine if a directory is shared and if so, what the sharename is? It seems a simple question, but I have been searching and not found the answer... Thanks in advance!
1
6133
by: orp | last post by:
We've been struggling on how to determine if a local user is already in a local group. We have code (C#) that creates a local user, if the user doesn't already exist. And, we have code (C#) that creates a local group, if the group doesn't already exist. Both of these work fine. Now, we need to check whether the local user is already in the local group or not. We have code (C#) that adds the local user to the local group, but we...
2
4525
by: Vincent | last post by:
I have been trying to find some API routines that will allow me to determine the name of the computer that is accessing a file on a server. I have found the NetFileEnum call (returns the names of the files in use and the names of the users accessing them). I have also found the NetConnectionEnum call (returns the name of the computer that is accessing a share). I do not see any way of correlating the data that these two api calls...
8
1939
by: rdemyan via AccessMonster.com | last post by:
Anyone have any ideas on how to determine when the back-end file (containing only tables) has been updated with new data. The date/time of the file won't work because it gets updated to the current date/time when the back-end file is compacted. I'm just looking for an easy way to determine when there has been a change to data in any table in the back-end file. Maybe something is updated in one of the system tables??
28
20681
by: Tim Daneliuk | last post by:
I have a program wherein I want one behavior when a file is set as executable and a different behavior if it is not. Is there a simple way to determine whether a given named file is executable that does not resort to all the lowlevel ugliness of os.stat() AND that is portable across Win32 and *nix? Thanks, ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: ...
0
9684
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10236
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7552
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6793
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.