Mirage Source
Create Folder - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Create Folder (/showthread.php?tid=2448)



Create Folder - Mattyw - 22-12-2008

Probably so simple, just missing it. How do I create a Folder through the code. For Backups & such?


Re: Create Folder - Dragoons Master - 22-12-2008

Call MkDir(App.Path & "\Database")
Creates a folder named 'Database' on the same folder that the calling program is running.


Re: Create Folder - Mattyw - 22-12-2008

Works perfect, now I know. ;D

Thanks.


Re: Create Folder - Dragoons Master - 23-12-2008

No problem ^^
Just to remember, it's good to check if the folder already does not exist, before creating it.
Code:
' Check if the database directory is there, if its not make it
    If LCase$(Dir(App.Path & "\database", vbDirectory))  "database" Then
        Call MkDir(App.Path & "\Database")
    End If



Re: Create Folder - Mattyw - 23-12-2008

Already done.