给你一个例子:
string temp
string snull
setnull(snull)
int n
n = 0
n = pos(path,"\",n + 1) //path为你要建立的路径
do while n>0 //循环一级一级建立
temp = left(path,n - 1)
CreateDirectoryA(temp,snull) //这个API函数可以只用后两个参数
n = pos(path,"\",n + 1)
loop
CreateDirectoryA(path,snull)