Media_GetPath ( container { ; parent } )
Media_GetName returns the name of an item or container reference.
Parameter | Description |
---|---|
container | Either a container reference, or a file or folder path. |
parent | Optional argument. If blank or omitted, the full path is returned. If a number, the full path to the parent directory at that level (see below). |
For example, let’s assume we have an image stored by reference in a container field named Image, and the path refers to “/Macintosh HD/Users/Fred/Desktop/Pictures/book.gif”.
If we want the full path returned, we can use:
Set Field [ MyTable::Response ;
Media_GetPath ( MyTable::Image ) ]
If we just want the enclosing folder without the file name included, we can set the parent parameter to “1”:
Set Field [ MyTable::Response ;
Media_GetPath ( MyTable::Image ; 1 ) ]
If we just want to know which user directory it is in, we can set the parent parameter to “3”:
Set Field [ MyTable::Response ;
Media_GetPath ( MyTable::Image ; 3 ) ]
Returns
The path to the specified file or folder (down to the specified parent directory level).