fileRandom function

Syntax

  • string fileRandom(searchQuery)

Parameters

  1. searchQuery—string
    Search query to apply on list of all files in the workspace. See fileSearch for details about the syntax.

Returns

Returns random file from list specified in searchQuery.

Description

The fileRandom function returns a random file from the list specified in searchQuery.

Related

Examples

fileRandom("assets/*.obj")
	# result = any one obj file from the assets dir

In this topic