Create non existing directory's
Ok, so I am trying to write a auto updater for my software.
I wrote a php script that gets all the files in the update directory and lists them.
so I would have :
Code:
./update/template/file1.template
./update/template/images/image.png
./update/dll/file.dll
./update/dll/extention/raw.dll
I would like the software to automatically create the folder tree for the files to be stored.
I already have a script to download it.
So the folder
/template should be created
and under /template add /images
Etc etc..
I wouldn't have a single clue how loop through this in the most efficient way
to just having the folders created from a list like this..
Thanks in advance.
I know it should be something with MKDIR..
Re: Create non existing directory's
Nested folders can be created via windows api:
Code:
Option Explicit
Private Declare Function MakeSureDirectoryPathExists Lib "imagehlp.dll" (ByVal lpPath As String) As Long
Private Sub Command1_Click()
'NOTE: ensure complete path ends with backslash
MakeSureDirectoryPathExists "c:\dir1\subdir1\subdir2\"
End Sub