473,394 Members | 1,697 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,394 software developers and data experts.

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.com
http://www.accessmonster.com/Uwe/For...ccess/200602/1
Feb 16 '06 #1
2 3455
robert d via AccessMonster.com 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
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...
12
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
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
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...
3
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...
1
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...
2
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...
8
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...
28
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.