Home Directory.Delete recursive interpreting a file as path (Access to the path 'file_without_extension' is denied
Reply: 0

Directory.Delete recursive interpreting a file as path (Access to the path 'file_without_extension' is denied

user450
1#
user450 Published in June 21, 2018, 12:58 am

I'm trying to make an app to "Quick Format" an usb flash drive, it's all good until i put a file without extension (eg: helloworld).

I'm using Directory.Delete(dir, true); to achieve my goal, but recursive delete is interpreting helloworld as a directory instead of interpreting it as a file, so it throws Access to the path 'helloword' is denied.

Any help will be appreciated!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.313146 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO