C#.net中的文件创建问题

编程入门 行业动态 更新时间:2024-10-26 02:28:10
本文介绍了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中的文件创建问题

本文发布于:2023-11-06 22:29:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564849.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!