Answered read only folder

Status
Not open for further replies.

aronmatthew

Member
Joined
Aug 5, 2019
Messages
19
Programming Experience
Beginner
im having some problems when accessing a folder that spontaneously switches to read only after each time i change the properties of the folder by hand. this is throwing an exception each time i try to change the contents of the folder in my code. i have tried to search google and all the code i found is useless in my program. there must be a way to handle the exception.
 
And then I quote this again :
I'm a curious cat, and would like to know what reason your application needs to copy random files from one location to another?

Regarding your exception, we will need the following :
  • What is the directory you are copying the files from
  • What is the directory you are copying the files too
  • What is the code you are using to copy the files to the destination folder
  • Is your application running with higher privileges
Once we get more details from you, it should be easier to help you.
 
I'm a curious cat, and would like to know what reason your application needs to copy random files from one location to another?

Regarding your exception, we will need the following :
  • What is the directory you are copying the files from
  • What is the directory you are copying the files too
  • What is the code you are using to copy the files to the destination folder
  • Is your application running with higher privileges
Once we get more details from you, it should be easier to help you.
 
If you don't answer the questions we have already asked you, I will close the topic, since we are going in circles here.

If you would like our support, you need to provide us with the details we already asked for.
 
OMG! Had to pretend I was an actor on CSI Las Vegas and go through that video frame by frame... The source and destination directory paths can be found at the 11 second time stamp.

Also notice at the 20 second time stamp that the exception thrown is not that the directory is read only as the OP has originally reported as well as put on the title, but rather that access has been denied.

@aronmatthew :
1) Please post your code in code tags... including that foreach loop that tries to delete the files.
2) From the debugger, copy the text value of the source directory from the Auto pane and paste it here.
3) From the debugger, copy the text value of the destination directory from the Auto pane and paste it here.
4) When the exception is thrown, click on that "Copy details" button/link in the exception error box, and paste it here.
 
Last edited:
theres direct upload of the video it contains all the code need to answer my question.
"its like having to ask a lawyer questions just obey the law"
-me

its obvious that microsoft has implemented windows such that this problem exists for the reason being .why would one ever need to copy a file from one folder to another for any reason other that rights violations. such tasks as moving files are reasonably handled by hand. saving on the other hand not a hassle. the program that i am writing picks a random movie from my collection and copy's it to a random folder. i suppose a better approach would be do just use visual studio to start the media player. the only other project on my horizon is a pong game although i reasoned that i would need 2 machines one that shoots a ping pong ball the other a oscillating paddle.
 
When you're stepping through with the debugger pressing F11 pause when it's on file and then hover your mouse over it and look at the location to see if it matches what you expected it to be.

Since you will not provide the information that we asked for by posting information as text.

It Is therefor impossible to help you any further. I recommend that you look at the debugger link in my signature to troubleshoot your own code.
 
theres direct upload of the video it contains all the code need to answer my question.
"its like having to ask a lawyer questions just obey the law"
We asked you to post your code in code tags in a much earlier post.

Also, a competent lawyer would advise you not to pay your court fees in pennies to spite the court.

I am dropping out of this thread because you obviously don't want any help, or if you truly do want help, you are making it difficult for us to try to help you. Good luck!
 
theres direct upload of the video it contains all the code need to answer my question.
You've been told what we need. If you won't provide it, you're unlikely to get what you need. You can tell us as many times as you want that we should do things the way you want us to. As soon as we're actually being employed by you to provide this help, we'll do it your way. As long as you're expecting people to volunteer their time to help strangers, you should consider what those people are asking of you. We've all been doing this a long time and we know what works best. If you're not prepared to provide that, you don't want the help that we're prepared to provide. The decision is yours.
 
Closing for the following reasons :
  • Title does not reflect actual problem in the topic
  • Topic does not relate to the issue reported
  • OP is non-cooperative
  • OP is not forthcoming with required info to resolve issue
  • OP is clearly trolling
If the OP requires future help, its advised they open a new topic and provide the required and requested details, including the relevant source code.

Conclusion for future readers... OP was clearly not setting the right path for the file, and that problem has nothing to do with read-only folder attributes.
 
Status
Not open for further replies.
Back
Top Bottom