AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos externos
  • Note: the fDir function retains access to the
  • Looping through directories
  • Windows
  • Using fDir in threads
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Finds a file or directory. This search can be performed with wildcard characters (*,?).
Remarks:
WEBDEV - Código ServidorPHPAjax
// Recherche du fichier "C:\MonRépertoire\MonFichier.doc"
ResRecherche = fDir("C:\MonRépertoire\MonFichier.doc")

// Recherche du fichier "C:\MonRépertoire\MonFichier.doc"
ResRecherche = fDir("C:\MonRépertoire\MonFichier.doc", frFile)

// Recherche du répertoire "C:\MonRépertoire\"
ResRecherche = fDir("C:\MonRépertoire\", frDirectory)

// Recherche du premier fichier de type ".doc" dans le répertoire "C:\MonRépertoire"
ResRecherche = fDir("C:\MonRépertoire\*.doc")
Sintaxis
<Result> = fDir(<Name of sought file or directory> [, <Options>])
<Result>: Character string
  • Name of file (with its extension) or directory found.
  • Empty string ("") otherwise. To determine if this function has generated an error, use ErrorInfo with the errMessage constant.
<Name of sought file or directory>: Character string
Name and full (or relative) path of the sought file or directory (up to 260 characters). A UNC path can be used. You have the ability to use wildcard characters (*,?) in the name of the file.
If this parameter is empty, the function continues the search to obtain the name of the next corresponding file (or directory): in this way, it is possible to obtain a list of files or directories belonging to a given directory..
If this parameter corresponds to a directory name, this name may (or may not) end with "\".
WindowsLinux This parameter can be in Ansi or Unicode format.
<Options>: Optional Integer constant (or combination of constants)
Search options:
frDirectoryFind a directory.
frFile
(Default value)
Find a file.
fUnicodePath<Result> will be a Unicode string.
This constant can be combined with frFile or frDirectory.
Observaciones

Note: the fDir function retains access to the

Calling fDir keeps an access to the directory, and prevents you from deleting or renaming it. To unlock the directory, add the following line of code to your process:
fDir("")

Looping through directories

Directory iterations performed with fDir must not be nested.
fDir must not be used when fCopyFile is used to a loop through directories.

Windows

In Windows, a file name or a directory name can contain lowercase and/or uppercase characters (the names of the files are not "case sensitive").
Therefore, you should not write:
IF fDir(NomFichier) = "TOTO" THEN Info("Fichier trouvé")
But you should write:
IF fDir(NomFichier) ~= "TOTO" THEN Info("Fichier trouvé")

Using fDir in threads

It is not recommended to use fDir at the same time in two different threads.
The last iteration started with fDir automatically replaces the current iteration.
Componente: wd300std.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 24/09/2024

Señalar un error o enviar una sugerencia | Ayuda local