C#.net中的文件创建问题 [英] File create problem in C#.net
本文介绍了C#.net中的文件创建问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在D:驱动器的每个文件夹中创建文件.
我知道如何创建文件,但如何在不知道文件夹名称的情况下进入文件夹.
i want to create file into each folder of my D: drive.
i know how to create file but how to enter into folder without know folder name.
推荐答案
以下链接说明了如何在文件夹中获取文件名.希望这会有所帮助
目录获取文件 [递归文件列表 [
The below links explain how to get the file names in a folder. Hope this helps
directory-getfiles[^]
recursive-file-list[^]
您必须创建一个变量.例如:
字符串uri;
当用户或某个事件为您提供文件夹的URL时,您会将值放入变量中并使用它.
you have to create a variable. For example:
string uri;
when the user or some event gives you the url of the folder you put the value into the variable and use it.
这篇关于C#.net中的文件创建问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文