如何检查多级文件夹 [英] How to check multi level folders
问题描述
大家好,
如何检查多级文件夹意味着说我将有一个目录路径,然后我转到该路径并删除所有文件夹中的所有文件...这可能包含子文件夹,并且还包含子文件夹。所以我没有得到如何做到这一点...
我们有一段时间来保存文件。我必须在检查创建的文件与给定时间段之后删除文件。一旦这段时间结束,那么我只能删除该文件。
能否请您知道如何做到这一点...
先谢谢。
问候,
Naveen
Hi All,
How to check multilevel folders mean to say I will have one directory path and I go to that path and remove all the files in all folder... That may contains sub folder and with in that again sub folders. So I am not getting how to do that...
We have some period to keep the files. I have to remove the file only after checking the file created on versus given period. Once that period is over then only I can delete the file.
Can you please give an idea how to do that...
Thanks in advance.
Regards,
Naveen
推荐答案
Directory.Delete [ ^ ]超载取一个bool值:当为true时,自动删除所有文件和子文件夹。
Directory.Delete[^] has an overload which takes a bool value: when true, all files and sub folders are automatically removed.
这篇关于如何检查多级文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!