Code: Select all
Result = CreateDirectory("C:\Data\Audio\SOUNDS\AMBIENCES\")
If Result = #False
Debug "Error"
Else
Debug "Done"
EndIf
It just does not create following folder path.
I tryed everything but it doesnt work. Any ideas ?
Code: Select all
Result = CreateDirectory("C:\Data\Audio\SOUNDS\AMBIENCES\")
If Result = #False
Debug "Error"
Else
Debug "Done"
EndIf
Code: Select all
SetCurrentDirectory(GetPathPart(ProgramFilename()))
res = CreateDirectory( "test" )
Debug res
SetCurrentDirectory("test")
res = CreateDirectory( "testA" )
Debug res
SetCurrentDirectory("testA")
res = CreateDirectory( "testB" )
Debug res
Kaeru Gaman wrote: better do not create a directory whereelse than in the APPDATA folder of the User Profile.
only an Installer should do that, and it needs Admin rights to do so.
Code: Select all
ForEach Folder()
If Not FolderExists(ProgramRoot + Folder()\Path)
Result = CreateDirectory(ProgramRoot + Folder()\Path)
If Result = #False
Debug Folder()\Path
End
EndIf
EndIf
Next
Was absolute false. APPDATA is to write or create Directories for your apllication!Kaeru Gaman wrote:... wasn't I precise or verbose enough for your taste ...
Code: Select all
Procedure CreatePath(Root.s, Path.s)
Protected LastFolder.s = Root
For i = 1 To CountString(Path, "\")
FolderName.s = StringField(Path, i, "\")
SetCurrentDirectory(LastFolder)
If Not FolderExists(FolderName)
CreateDirectory(FolderName)
EndIf
LastFolder = FolderName
Next
EndProcedure
The trustinfo of the manifest should be what requests administrator privileges via "requireAdministrator".Kaeru Gaman wrote:I don't know if you need to invoke this
Code: Select all
MakeSureDirectoryPathExists_("C:\Data\Audio\SOUNDS\AMBIENCES\")
He meant that you shouldn't create directories anywhere else.ts-soft wrote:Was absolute false. APPDATA is to write or create Directories for your apllication!Kaeru Gaman wrote:... wasn't I precise or verbose enough for your taste ...
That is the path for
Good call, eJan!eJan wrote:This API should work:http://msdn.microsoft.com/en-us/library ... S.85).aspxCode: Select all
MakeSureDirectoryPathExists_("C:\Data\Audio\SOUNDS\AMBIENCES\")