Media_GetItemInfo ( item )
Media_GetItemInfo gives you system information about an external file, returning information such as creation, modification, type, extension, and size.
Parameter | Description |
---|---|
item | Path to the item (file or folder) |
Use Media_ExtractInfo to extract individual values from the response.
Media_ExtractInfo works with both simple lists and key-value pairs.
Returns
This function returns text containing a list of information about the item. For example, a response for an MPEG-4 audio file might look like this:
Created: 13-12-2005 22:25:23
Modified: 13-12-2005 22:26:14
Invisible: 0
Directory: 0
Data size (b): 473264
Resource size (b): 286
Locked: 0
Alias: 0
Type: mpg4
Creator: TVOD
Examples
To check the information on a file on the desktop named “wolf.jpg”:
Set Field [ MyTable::Response ;
Media_GetItemInfo ( “.D/wolf.jpg” ) ]
To isolate just the file size into a field named Size, you can use this function in conjunction with Media_ExtractInfo:
Set Field [ MyTable::Size ;
Media_ExtractInfo (
Media_GetItemInfo ( ".D/wolf.jpg" ) ;
"Data size"
) ]