423,832 Members | 1,902 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,832 IT Pros & Developers. It's quick & easy.

Visual Basic file path to stream

P: 1
I'm attempting to read data from a file via a StreamReader. I need the file path to be dynamic and change according to the users storage location. I'm able to retrieve the file path, however, my StreamReader cannot read the file. Is this something relating to File read permissions or is it because the file path has space in it?

I will present the code currently being run to determine the file path. This is not entirely my code, i'm just in the process of testing this to see if I can figure it out.

Jan 16 '17 #1
Share this Question
Share on Google+
1 Reply


Frinavale
Expert Mod 5K+
P: 9,731
It would help if you posted the exception that you are getting.

You could use the File.Exists Method to check if the file is actually at the location provided before trying to read the file...user's sometimes input things incorrectly.

-Frinny
Jan 17 '17 #2

Post your reply

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