PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

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
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
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).
Example
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("")
END
Syntax
<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:
ceFile
(Default value)
Find a file.
ceDirectoryFind a directory.
Remarks

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:
ceDir("")

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.

Windows

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.

Equivalence

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…
Comments
Click [Add] to post a comment