在检查此目录是否已存在之后,如何制作新文件夹,如下所示:
; Create the temp dir with fix path name!
!define TMPDIR "C:\temp"
IfFileExists ${TMPDIR}\*.* +2
CreateDirectory ${TMPDIR}
答案 0 :(得分:1)
If (!System.IO.Directory.Exists("C:\temp"))
System.IO.Directory.CreateDirectory("C:\temp")
答案 1 :(得分:1)
你在找这个吗?
String directoryToCreate = @"C:\temp";
if (!Directory.Exists(directoryToCreate))
Directory.CreateDirectory(directoryToCreate);