fileexists (Windows Embedded CE 6.0)

1/6/2010

This command determines whether a particular file or directory currently exists on the client.

Syntax

fileexists [filesys path]

Parameters

  • filesys path
    Fully qualified file system path to the file or directory to test.

Example Code

The following example shows how you can use this command.

; *******************************************
; Checking if files or directories exist
; *******************************************
set dir "\windows"

if boolean `fileexists "%dir%"` == true
  echo "... '%dir%' directory found"
else
  echo "... '%dir%' directory not found"
endif

Remarks

This command outputs TRUE if the named file or directory currently exists on the client or FALSE if it does not.

This command is typically used within backticks to perform command substitution.

See Also

Reference

Environment Commands