Access Denied
Access Denied
Access Denied
Access Denied
Access Denied
Access Denied Access Denied Access Denied Access Denied Access Denied Access Denied Access Denied Access Denied
Access Denied Access Denied
Access Denied
Go Back  Xtreme Visual Basic Talk > > > Access Denied


Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2005, 03:56 PM
clevlndsteamer clevlndsteamer is offline
Freshman
 
Join Date: Jul 2005
Location: Pittsburgh
Posts: 27
Angry Access Denied


Can anyone help me out. this program i am writing tells me that when it reads the file path from a text document, it finds the file, and the moves the original file to path (E

this is what i have so far:

DIm Path As String = "C:\Files\Back Up Files.txt"
Dim Path 2 As String = ("E:")
Dim fs As New IO.FileStream(Path, FileMode.Open)
Dim sr As New IO.StreamReader(fs)
Path = sr.ReadLine()

Do

File.Move(Path, Path2)

Loop While sr.ReadLine >= 0

fs.Close()
sr.Close()

when i run this program it tells me that access to path "E:" is denied.

why is that


Thanks in advanced to anyone who replies
Reply With Quote
  #2  
Old 07-25-2005, 04:21 PM
elnerdo's Avatar
elnerdo elnerdo is offline
Contributor
 
Join Date: Jul 2004
Location: Northern New Jersey
Posts: 490
Default

You get access denied on any file IO method when you run the program from a streaming it from online/[shared/network]drive.
__________________
nerds unite!
Reply With Quote
  #3  
Old 07-25-2005, 04:40 PM
clevlndsteamer clevlndsteamer is offline
Freshman
 
Join Date: Jul 2005
Location: Pittsburgh
Posts: 27
Default

Quote:
Originally Posted by elnerdo
You get access denied on any file IO method when you run the program from a streaming it from online/[shared/network]drive.


What do you mean............this is all new to me....i have done some vb .net before but not much.
Reply With Quote
  #4  
Old 07-26-2005, 11:12 AM
clevlndsteamer clevlndsteamer is offline
Freshman
 
Join Date: Jul 2005
Location: Pittsburgh
Posts: 27
Default help

i have been getting responses back saying that there is no way to take the original file and copy it to a new location and only specifiyin the drive letter for the new location. i wonder why you can't do it. is there any way to be able to read the lines of a text document, find the file paths that are on each line, copy them from their original location and then copy them to a new location without naming the actualy ne location just telling it the drive letter to put the new copy at. any help would be greatly appricated.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Access Denied
Access Denied
Access Denied Access Denied
Access Denied
Access Denied
Access Denied Access Denied Access Denied Access Denied Access Denied Access Denied Access Denied
Access Denied
Access Denied
 
Access Denied
Access Denied
 
-->