473,394 Members | 1,916 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.

How to read files off a network drive/folder? Please help!

Hi all,
I'm using VB.Net 2003 to write a small program to display images in
PictureBox1:

Dim filePath As String
Dim fileName As String
.........
.... Do some stuff to get filePath and fileName
.........
PictureBox1.Image = Image.FromFile(filePath + fileName)

I have no problem if the image file is on the local drive (C:), but if the
file is on a network drive then I have the "file not found"error. I have
checked & confirmed that the network drive in question is mapped, and the
file is at the right location as suggested in filePath. Oh, BTW, I also used
admin right to the drive, so access permission is out of question.
Any Ideas?
Thanks in advance!

Nov 21 '05 #1
2 3738
Just a thought...have you replaced your 'filePath+fileName' variables with
the hard-coded path? Does it return the same error or is it OK?

Will quickly try the same as you.

Rgds, Phil

"Duy Vu" <vh****@hotmail.com> wrote in message
news:u9**************@TK2MSFTNGP12.phx.gbl...
Hi all,
I'm using VB.Net 2003 to write a small program to display images in
PictureBox1:

Dim filePath As String
Dim fileName As String
........
... Do some stuff to get filePath and fileName
........
PictureBox1.Image = Image.FromFile(filePath + fileName)

I have no problem if the image file is on the local drive (C:), but if the
file is on a network drive then I have the "file not found"error. I have
checked & confirmed that the network drive in question is mapped, and the
file is at the right location as suggested in filePath. Oh, BTW, I also
used
admin right to the drive, so access permission is out of question.
Any Ideas?
Thanks in advance!

Nov 21 '05 #2
Thanks for the suggest tion. However, I got it figured out. Instead of using
\\servername\sharedfolder\ as the file path, I was using Windows mapped
drive letter, i.e "S:\sharedfolder\" for the file path, and this gave me the
"file not found" error.
"Phil" <Ph**@nospam.com> wrote in message
news:dd**********@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
Just a thought...have you replaced your 'filePath+fileName' variables with
the hard-coded path? Does it return the same error or is it OK?

Will quickly try the same as you.

Rgds, Phil

"Duy Vu" <vh****@hotmail.com> wrote in message
news:u9**************@TK2MSFTNGP12.phx.gbl...
Hi all,
I'm using VB.Net 2003 to write a small program to display images in
PictureBox1:

Dim filePath As String
Dim fileName As String
........
... Do some stuff to get filePath and fileName
........
PictureBox1.Image = Image.FromFile(filePath + fileName)

I have no problem if the image file is on the local drive (C:), but if
the
file is on a network drive then I have the "file not found"error. I have
checked & confirmed that the network drive in question is mapped, and the
file is at the right location as suggested in filePath. Oh, BTW, I also
used
admin right to the drive, so access permission is out of question.
Any Ideas?
Thanks in advance!


Nov 21 '05 #3

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

Similar topics

0
by: Nautilus | last post by:
I am writing an application in ASP.Net which generates a list of files from a shared network folder using DirectoryInfo class and then I use the wonderful control, <a...
2
by: Jim Richards | last post by:
I have been told by a local PC club technician that 98SE cannot read NTFS drives in a network. Is this true? TIA, Jim.
5
by: Mike McIntyre [MVP] | last post by:
I am working on an issue where and ASP.NET web application on one computer (A) needs to access files on a network mapped drive (B). This application uses as DSN on (A) that maps a proprietory...
2
by: Tom Wells | last post by:
I have a little file upload page that I have been able to use to successfully upload files to the C: drive of LocalHost (my machine). I need to be able to upload to a network drive from the intranet...
5
by: Mitchell S. Honnert | last post by:
Is there a way, given the full path of a folder on a network, that one can programatically tell if you have Read access to that folder? I have an application where the user is able to select a...
2
by: 1388-2/HB | last post by:
On a W2K3 box running IIS 6 I have a web app that implements Forms Authentication mixed with AD (the login page autheticates users against AD & impersonates them with each page request). This...
4
by: sajid_yusuf | last post by:
Hi I am trying to develop a Windows service in VB.NET which has timer enabled and keeps checking a folder (or group of folders) for any new file or changed files. As soon as it detects any new...
1
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
Using .NET 2.0 is it more efficient to copy files to a single folder versus spreading them across multiple folders. For instance if we have 100,000 files to be copied, Do we copy all of them to...
4
Chrisjc
by: Chrisjc | last post by:
Good evening, I was wondering if anyone knew of a way or something to help me out with an issue I been dealing with lately, I have several sites in an Active Directory environment across a WAN....
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
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
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...

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.