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!