By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,791 Members | 1,606 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,791 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

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.

Jan 17 '17 #2

Post your reply

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