473,487 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

False report of existence of file

I use the following code to check to see if a file exists in a folder:

If (_InfeedFilefolder.Length 0) AndAlso (_InfeedFilename.Length >
0) Then
If (My.Computer.FileSystem.FileExists(GetFullInfeedFi lePath) =
False) Then
_BrokenRules.AppendLine(" - Infeed file does not exist (" &
GetFullInfeedFilePath() & ")")
End If
End If

GetFullInfeedFilePath is a function that returns the full path to the
file.

Well, when I run this code on my development machine, it works like a
charm. However, when I run it on a server box at my client's site,
My.Computer.FileSystem.FileExists(GetFullInfeedFil ePath) returns False
for files that do, in fact, exist. When I copy and paste the full path
it's checking for the existence of into Windows Explorer, the file
comes up no problem.

Any ideas as to why this would be happening?

In case this is relevant, I am developing on a Vista machine with
VS2008, the the server is a Windows 2003 Server box.
Mar 25 '08 #1
2 1105
On Mar 25, 11:14*pm, BobRoyAce <b...@omegasoftwareinc.comwrote:
I use the following code to check to see if a file exists in a folder:

* If (_InfeedFilefolder.Length 0) AndAlso (_InfeedFilename.Length >
0) Then
* * If (My.Computer.FileSystem.FileExists(GetFullInfeedFi lePath) =
False) Then
* * * _BrokenRules.AppendLine(" *- Infeed file does not exist (" &
GetFullInfeedFilePath() & ")")
* * End If
* End If

GetFullInfeedFilePath is a function that returns the full path to the
file.

Well, when I run this code on my development machine, it works like a
charm. However, when I run it on a server box at my client's site,
My.Computer.FileSystem.FileExists(GetFullInfeedFil ePath) returns False
for files that do, in fact, exist. When I copy and paste the full path
it's checking for the existence of into Windows Explorer, the file
comes up no problem.

Any ideas as to why this would be happening?

In case this is relevant, I am developing on a Vista machine with
VS2008, the the server is a Windows 2003 Server box.
Bob,
Would you also mind trying "system.io.file.exists" nethod if situation
changes?

Regards,

Onur Güzel
Mar 25 '08 #2
Would you also mind trying "system.io.file.exists" nethod if situation
changes?
Will try that and post results...won't happen for a day or two though.
I was wondering about the My.Computer.FileSystem part, so, we'll
see...
Mar 25 '08 #3

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

Similar topics

33
2958
by: Steven Bethard | last post by:
I feel like this has probably been answered before, but I couldn't find something quite like it in the archives. Feel free to point me somewhere if you know where this has already been answered. ...
15
2295
by: F. Da Costa | last post by:
Hi all, Following two sniperts of code I'm using and getting very interesting results from. ..html <tr id="1" class="segment" open="false"> This is the segment under 'investigation' ..js
14
7674
by: Matt | last post by:
Hello, I see other references in this newsgroup saying that the only standard C++ way to test for file existence is some variant of my code below; can someone please confirm...or offer...
2
1769
by: Claudia Fong | last post by:
Hi, I have 4 reports created in Ms-access and I will use VB to print those reports. My problem is I'm not sure if I can control wich report to print.. Those reports are almost the same, what...
15
2128
by: shaqattack1992-newsgroups | last post by:
Hello Everyone, Let me explain my problem. I have included 2 dashes between each pair of records to make it easier to see what goes together. In reality, it is just a long list of results...
7
11227
by: Henry | last post by:
I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that utilizes Crystal Reports. I want to be able to dynamically set the report data source at run time. I'm trying to change...
12
1788
by: DC Gringo | last post by:
How do I test for existence of a file in the file system: If FileExists(myVariable & ".pdf") = True pnlMyPanel.Visible = True End If -- _____ DC G
2
2818
by: kaosyeti | last post by:
i can't get this working. in vba i tried to set visible to false in an if statement that looked like this: Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer) If...
3
4154
by: trint | last post by:
How can I do this with my c# code with my website(because the file is there, but the code doesn't return it)?: if(File.Exists(String.Format("~/images/categories/{0}", sFileName)) return...
0
6967
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
7137
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
5442
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,...
1
4874
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...
0
4565
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...
0
3076
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...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
267
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...

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.