本文介绍了C#中的文件创建问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在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中的文件创建问题
发布评论