Xbasic
TOKEN_NAME_INCREMENT Function
Syntax
Unique_Filename as C = TOKEN_NAME_INCREMENT(C string[,N max_length])
Arguments
- string
The name of a file.
- max_length
Controls the maximum length of the resulting Unique_Filename.
Description
TOKEN_NAME_INCREMENT() returns a unique file name derived from Filename by adding a sequence number. Incrementing a name value is useful for creating unique names when a name already exists.
Example
output_file = "customer" while file.exists(:a5.get_shared_path() + chr(92) + output_file + ".pdf") output_file = token_name_increment(output_file) end while
See Also