Fieldpine Logo Documentation Home  

TU Command Line Utility


Tu.exe is a standalone Windows executable that can send eLink commands to your Retail servers. This permits you to easily automate some tasks in scheduled tasks. Tu is primarily a technical tool for IT support staff.

The general format of using TU is

tu global args  command command args
host address
Sets the Gds server to use

Notes

Environment variable "FieldpineTuHost" can be defined to predefine the host server.

set FieldpineTuHost=myserver:22341
tu load images .....
rather than
tu host myserver:22341 load images ....

Load Images

Bulk load images by scanning a folder(s) and inserting these into the retail database

path string
A path to scan. This parameter can be repeated multiple times
include subdir
Causes scanning of a directory to include any subdirectories
pattern string
A definition pattern to apply to each file located in the path. A pattern is used to supply matching information that identifies how a filename is matched to a product. This parameter can be repeated multiple times.
orientation string
Defines where the camera is positioned. Can be a value from front, side, rear, above, below, right, left

Notes

Loading of images uses the following logic

  1. The path provided is scanned, including sub directories if specified
  2. Each file found is processed against the pattern and the unique criteria (eg Pid) extracted
  3. A call to the retailmax.elink.media.edit API is made, including the image data
  4. The server on receiving this API call validates the call and verifies this image has not already been loaded
Everytime TU is run, all the images are sent to the server. If you are processing a large number of images then they will all be transmitted over the network.

Example Image Loads

Loading a folder and sub folder of all images matching a specific pattern. This might be used as a scheduled task to automatically load images.
tu host 127.0.0.1:8310 load images path e:\Images\*.png pattern f*%PID%*.png orientation front include subdir

Alternatively, create a batch file to execute these commands

set FieldpineTuHost=myserver:22341
tu load images path .\*.png pattern f*%PID%*.png orientation front include subdir
tu load images path .\*.png pattern s*%PID%*.png orientation side include subdir
tu load images path .\*.jpg pattern f*%PID%*.jpg orientation front include subdir
tu load images path .\*.jpg pattern s*%PID%*.jpg orientation side include subdir

The next example is a more complete production ready example, just needs changing to reflect actual server address and Windows directory paths

setlocal

REM Set the Host we are to use
REM You must change "myserver" to be the IP address or host name to be used
set FieldpineTuHost=myserver:8310

REM  Set the path to where we are now
set "FieldpineTuPath=%cd%"


REM Change default to correct directory.  Replace E: with disk and cd \Images with actual path
E:
cd \Images

echo %cd%
%FieldpineTuPath%\\tu verbose load images path .\* pattern f*%%PID%%*.png orientation front include subdir
%FieldpineTuPath%\\tu verbose load images path .\* pattern s*%%PID%%*.png orientation side include subdir
%FieldpineTuPath%\\tu verbose load images path .\* pattern f*%%PID%%*.jpg orientation front include subdir
%FieldpineTuPath%\\tu verbose load images path .\* pattern s*%%PID%%*.jpg orientation side include subdir

Hammer

Not documented. Provides ability to place high load on API calls for testing.

List

Allows listing data from DATI files. A DATI file is a binary storage file used in many places within Fieldpine. TU List enables you to extract records from these files

file name
The name of the file to read
first N
Display only the first N records found in the file
last N
Display only the last N records found in the file
[...]
Selection predicates

Examples

tu list file purchaseorderprocessing [f108,0,1]

Opens and reads the file with PurchaseOrderProcessing in the name (eg *PurchaseOrderProcessing*.dati) and then selects only records where field 108 is equal to "1"