Reputation: 41
I want to get all the PDF files from my MyComputer Folder. I have written the code which is getting all of my drives successfully but there is an exception occurring and none of file is accessible. Here is the exception message. Please help me for this.
"Access to the path 'C:\$RECYCLE.BIN\S-1-5-18' is denied."
My requirement is to get all the pdf files and their paths from My Computer folder.
Upvotes: 0
Views: 339
Reputation: 1776
if you are running your C# program from visual studio: close VS and run it as administrator
if you are running your C# program alone from created .exe file in bin
try to run that as an administrator account
I hope it'll be helpfull
Upvotes: 1