The Shell Command Tool (sh.exe) is a tool which is based on the Windows CE operating system. Sh.exe commands should be entered in the dialog located by choosing CE Target Control from the Target menu in Platform Builder, and all outputs go into the Platform Builder debug window.
It provides abilities such as:
- Copying a file or files to/from the local operating system from/to a storage card, flash card, or CESH machine.
- Listing a file or files to/from a local operating system, storage card, flash card, or CESH machine.
- Deleting a file or files within a given path.
- Displaying or changing file attributes.
- Making directories or removing directories.
- Creating an empty file.
- Giving help information.
SH assists you in manipulating files by supporting hardware device shortcuts, wildcards, and spaced filenames.
Using the Commands
You must specify one of the following paths for file operation:
- “\release\” — for remote desktop release directory
- “\windows\” — for \windows directory
- “\” — for root directory on target device
If you do not specify one of these paths, the sh command will fail.
Use the hardware device shortcut with caution, as shortcuts are required to have the loading backslash. Otherwise, shortcuts are not converted to the corresponding device files.
- To use spaced file name, you have to use quotes. For example, “\Storage Card\”
For your convenience, SH provides shortcuts for
- Machine that starts cesh = \release\
- Storage card = \storage card\
- Storage card2 = \storage card2\
- Cd dash = \cd\
- During copy, if you don’t want to specify destination file names, then append a backslash (\) after the last directory name. For example, “\release\myfolder\”.
- All commands are case insensitive.
The following commands are used with the Shell Test (sh.exe):
|COPY||Copies one or more files to another location.|
|DIR||Displays a list of files in a given directory.|
|DEL||Deletes one or more files on the device.|
|DELTREE||Deletes the files and subdirectories from a given directory.|
|ATTRIB||Displays or changes file attributes.|
|MD||Creates a directory on the device.|
|RD||Removes a directory on the device.|
|CREATE||Creates an empty file on the device.|
|SAMPLE||Gives a usage example.|
|HELP||Gives usage information.|
- sh.exe does not support an emulator.
- sh.exe does not support the copy of changing file extensions by using wildcard, i.e. “s sh copy *.txt *.cpp” will return failure.