What should I do on Platform Builder (6.0R3) in order that the resulting image of a BSP I am working on, to have a directory named "abc" in the file system root. In addition, this directory has to have some files (executable and dll generated on .NET Compact 3.5).
I have searched, but only found how to add files to the Windows directory by editing Platform.bib, but not how to create a new directory with certain files in it.
You can use
platform.datfile for Creating a directory and/or copying files to directory.The commands, or file parameters, in DAT files are:
root, which designates the root folder.Directory(“<Directory name>”), which is used to both designate a folder and to create a new folder.Permdir(“<Directory name>”), which is used to create a new folder that cannot be deleted by the user.File(“<destination file name>”, “<source path and file name>”), which is used to copy a file.Create a folder
You can use
DATfiles to create a folder, or folder tree.This is exactly what the DAT files in the Public folders do to create the directory structure that you see when you boot your system.
Example of creating
\MyFolder\SubFolderusingplatform.dat:Which does the following:
Creates a folder named MyFolder in the root of the file system.
Creates a folder named SubFolder in \MyFolder which cannot be deleted
Directory()is used in two ways; one to create a directory, and the other to specify a folder in which the new directory will be created.Copy a File to a Folder
You can also use
DATfiles to copy files from the\Windowsfolder to one or the newly created folders.Example of copying
MyApp.lnkto\MyFolder\SubFolder:Which copies
\Windows\MyApp.lnkto\MyFolder\SubFolder\MyApp.lnk.But what if you want to rename the file:
Which renames
MyApp.lnktoMyNewName.lnkwhen it copies it to\MyFolder\MySubfolder.Source : Platform Builder: Using Dat Files to Initialize the File System - A blogpost by Bruce Eitman