question

AndrewWissler-0704 avatar image
0 Votes"
AndrewWissler-0704 asked AndrewWissler-0704 commented

How do I delete folders from WindowsApps safely?

How do I delete folders from WindowsApps safely?

windows-uwp
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AndrewWissler-0704 You mean you want to delete folders programmatically in uwp app, right? If yes, you could use StorageFolder.DeleteAsync method to do this.

1 Vote 1 ·

Is that the best way to do that?

0 Votes 0 ·
AndrewWissler-0704 avatar image
0 Votes"
AndrewWissler-0704 answered AndrewWissler-0704 commented

Thank you very much. Your information is greatly appreciated.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AndrewWissler-0704 It's my pleasure to help you. I have converted the comment as an answer, you could accept the existing answer, which will help others that facing the same question.

0 Votes 0 ·

Thank you very much.

0 Votes 0 ·
AryaDing-MSFT avatar image
0 Votes"
AryaDing-MSFT answered AryaDing-MSFT edited

Hi,

Welcome to Microsoft Q&A!

StorageFolder.DeleteAsync method is native API in uwp, which is more suitable for operations on the file system in uwp. Therefore, it is recommended to use this API to delete folders from uwp app.



If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.