Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Caution: ceDir keeps an access to the directory
  • Browsing directories
  • Windows
  • Managing errors
  • Equivalence
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Finds a file or a directory on the Mobile Device (Pocket PC) connected to the current computer.
Remark: This search can be performed only if a connection is established between the current computer and the Mobile Device (ceConnect).
Path is string
// Find all the files found in
// the "\MyDirectories" directory found
// on the Mobile device connected to the current computer
Path = ceDir("\MyDirectories\*.*", ceFile)
// Add the files found into "LIST_FileList"
WHILE Path <> ""
ListAdd(LIST_FileList, Path)
Path = ceDir("")
<Result> = ceDir(<Name of Sought File or Directory> [, <File/Directory>])
<Result>: Character string
  • Name of file (with its extension) or directory found,
  • Empty string ("") otherwise.
<Name of Sought File or Directory>: Character string (with quotes)
Name and full path of the file (or directory) sought (up to 260 characters). Wildcard characters are allowed (*,?).
If this parameter is empty, the function continues and searches for the name of the next corresponding file (or directory): this allows you to list the files or directories belonging to a given directory.
If this parameter corresponds to a directory name, this name may (or may not) end with "\".
<File/Directory>: Optional constant
Specifies whether the sought element is a file or a directory:
(Default value)
Find a file.
ceDirectoryFind a directory.

Caution: ceDir keeps an access to the directory

The call to ceDir locks the directory and prevents you from deleting it or from renaming it. To unlock the directory, add the following code line to your process:

Browsing directories

The browses of directories performed by ceDir must not be nested.
ceDir must not be used when ceCopyFile is used in a loop for browsing directories.


In Windows, a file name or a directory name may contain lowercase and/or uppercase characters (the file names are "case sensitive").
Therefore, you should not write:
IF ceDir(FileName) = "TOTO" THEN Info("File found")
But you should write:
IF ceDir(FileName) <> "" THEN Info("File found")

Managing errors

Caution: ceDir returns no error code. To find out if this function has generated an error, use function ErrorInfo with constant errMessage.


ceDir and fDir have equivalent operating modes.
The only difference is:
  • ceDir handles a file or a directory found on the Mobile Device from a WINDEV application.
  • fDir handles a file or a directory found on the Mobile Device from a WINDEV Mobile application.
Component: wd260ce.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment