文件夹名称签入C# [英] Folder Name Check in C#

查看:77
本文介绍了文件夹名称签入C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网络中连接了10台计算机,每个桌面上都包含几个文件夹,并且每个文件夹都具有名称为abc,123的子文件夹(并且这些文件夹还包含其他子文件夹).

现在,我想获取以(_del(或)_old)结尾的文件夹名称.
你们中的任何一个都可以帮我吗....

I have 10 computers conected in a network and each of the desktop contains few folders and each of these folders are having sub folders with name like abc,123 (and these folder contains other subfolders also).

Now I want to get folder names which are having name ends with (_del (or) _old).
Can any of you help me in this....

推荐答案

以main_directory作为顶层目录的路径,请执行
With main_directory being the path to the top level directory, do
string[] del =  System.IO.Directory.GetDirectories(main_directory, "*_del", System.IO.SearchOption.AllDirectories);


这篇关于文件夹名称签入C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆