PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Operating mode in Windows Vista (and later)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Creates a directory (and the intermediate directories if necessary).
WEBDEV - Server codePHPAjax
// Create a directory
ResCreate = fMakeDir("C:\MyDirectories\MyFiles")
// If the directory named MyDirectories does not exist,
// the function creates MyDirectories then MyFiles
Syntax
<Result> = fMakeDir(<Path of Directory to Create>)
<Result>: Boolean
  • True if the directory was created or if this directory already exists,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Path of Directory to Create>: Character string (with quotes)
Name and full (or relative) path of the directory to create (up to 260 characters). A UNC path can be used. This directory name may (or may not) end with "\". If no drive letter is specified, the directory is created in the current directory. If this parameter contains several directories that do not exist, all the necessary directories are created.
Versions 15 and later
WindowsLinux This parameter can be in Ansi or Unicode format.
New in version 15
WindowsLinux This parameter can be in Ansi or Unicode format.
WindowsLinux This parameter can be in Ansi or Unicode format.
Remarks
WEBDEV - Server code

Operating mode in Windows Vista (and later)

If this function does not operate properly in Windows Vista (and later), check whether the file or directory used is not in one of the system directories (Windows directory or "Program Files" directory).
Indeed, in Windows Vista (and later), with the UAC mechanism (User Account Control) enabled, you must have the administrator privileges to handle and/or modify the files or directories in the system directories (Windows directory or "Program Files" directory).
Programming tip: To handle and/or modify the files or directories without administrator privileges, you should:
  • avoid writing into the Windows directory or into the "Program Files" directory,
  • use the system directory corresponding to the application (returned by SysDir associated with the srCommonAppData constant).
Remark: In Windows Vista (and later), the virtualization mechanism is used to make the applications compatible with Vista. If the file is created in a system directory without having sufficient rights, this file will actually be created in another directory (C:\Users\<LOGIN>AppData\Local\VirtualStore\Windows\). In this case, the file cannot be shared between several applications.
Component : wd250std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
video fMakeDir
https://youtu.be/5Q1RU3l08B4

//==
//PROCEDURE CRIAR_DIRETORIO()

sNOME_DIRETORIO is string=""
LOOP
Input("INFORME NOME PASTA/DIRETORIO",sNOME_DIRETORIO)
IF sNOME_DIRETORIO<>"" THEN
BREAK
END
END
IF fMakeDir(TVT_DIRETORIO.COL_01_DIRETORIO+"\"+sNOME_DIRETORIO) THEN
Info("DIRETORIO CRIADO COM SUCESSO")
END
LISTA_DIRETORIO()

amarildo
14 Sep. 2019