Compartilhar via


File System File (Windows CE 5.0)

A file system (.dat) file defines the directory and file locations for the initial settings on a target device.

When you cold boot your run-time image on the target device, Filesys.exe uses these .dat files to create the directories, links, and files in the root file system on the target device.

When updating the Project.dat file to define directory and file locations, you can specify any root directory name other than the Windows directory and its subdirectories.

In addition, you can copy or link to a file in the ROM Windows directory. The file or link is created in the root file system that is part of the object store in the directory specified by the .dat file.

The following code example shows typical entries in a Project.dat file.

root:-Directory("My Documents")
root:-Directory("Program Files")
Directory("\Program Files"):-Directory("My Projects")
Directory("\Program Files"):-Directory("Accessories")
Directory("\Program Files"):-Directory("Communication")
Directory("\Program Files\My Projects"):-File("My Project Program", "\Windows\Myproj.exe")
root:-File("\control.lnk", "\Windows\control.lnk")

The root: statement defines the root directories for the run-time image. The root: statement is used to create any subdirectories that must be the first entry in the file.

Two directories, My Documents and Program Files, are located below the root directory. In addition, three subdirectories — My Projects, Accessories, and Communication — are located in the Program Files directory.

The -File parameter copies the file Myproj.exe from ROM, as defined by the Windows directory, into the My Projects directory with the My Project Program file name.

When updating the .dat files, you can use IF and ENDIF conditional blocks and, optionally, the NOT (!) operator. Use the semicolon (;) to start a line of comments.

The following code example shows how the subdirectory locations for the Program Files directory could be rewritten.

IF IMGINCLUDEAPPS
  Directory("\Program Files"):-Directory("My Projects")
ENDIF
IF IMGNOACC !
  Directory("\Program Files"):-Directory("Accessories")
ENDIF
Directory("\Program Files"):-Directory("Communication")

In this example, Makeimg.exe includes the My Projects directory if the user-defined environment variable IMGINCLUDEAPPS has been set before running Makeimg.exe. If**the environment variable IMGNOACC is not set, the Accessories directory is included.

Regardless of environment variable settings, the Communication directory is included in the run-time image.

At boot time, the OS parses the information that was in the .dat file and creates a more robust file system by creating other directories and copying files to their appropriate locations.

Items listed in the .dat file are then copied, not moved.

Shortcut or link (.lnk) files make up most of the items in the .dat file, because .lnk files are very small and are not symbolic links. Items placed in the ROM image appear in the Windows directory. The only way to make a file appear outside the Windows directory is through the .dat file.

See Also

Run-Time Image Configuration Files

Last updated on Thursday, February 02, 2006

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.