简体   繁体   中英

Get All Pdf Files from My Computer Folder

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM