创建文件夹结构 [英] Create folder structure
本文介绍了创建文件夹结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一种跨多个驱动器自动创建项目文件夹结构并为它们正确设置权限的方法.
像Robocopy这样的东西可以从具有所有正确权限集的Template目录中复制.
这就是我所拥有的:
I need a way to automatically create the project folder structure across multiple drives and set the permissions for them properly.
Something like Robocopy to copy from a Template directory that has all the correct permissions set.
This is what I have:
Private Sub btnCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreate.Click
Try
Directory.CreateDirectory(Path(".") & "\" & txtProject.Text)
'Creating a directory by specifying a path in the TextBox, of the form C:\BDL\
'Instead of using a TextBox you can directly type the location of the directory like this
'Directory.CreateDirectory("T:\BDL\")
Catch ex As Exception
End Try
MsgBox("Directory " & txtProject.Text & " Created")
End Sub
我想确保用户只输入数字. -该文件不存在
我该怎么办?
谢谢
I want to make sure that user puts only numbers. -the file does not exists
How do i do that?
Thank you
推荐答案
^ ]提供了您所需要的一切.您有具体问题吗?
The documentation[^] provides all what you need. Do you have specific question?
您输入了什么,因此用户只能输入数字,文件夹名称应该是数字.
谢谢
what do you put, so the user can only enter numbers, the folder name should be a number.
thanks
这篇关于创建文件夹结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文