Maptitude GISDK Help

GetRandFileName()

Summary

Generates a valid and unused file name with a given specification, but does not delete such files on shutdown.

 

Changes

Added to Version 2019.

 

Syntax

name = GetRandFileName(string path)

 

Argument

Contents

path

Null, or a full or partial path, with an optional extension

 

Returns

A string containing a full path, file name, and extension (if specified).

 

Notes

Examples

// In all examples:

// - The temporary file name is shown as "ttt"

// - The user name is shown as "user"

// - Thrame prog folder is shown as "C:\Program Files\Maptitude"

tmp = GetRandFileName() // tmp = "C:\DOCUME~1\user\LOCALS~1\Temp\Maptitude\ttt"

tmp = GetRandFileName(".dbf") // tmp = "C:\DOCUME~1\xxx\LOCALS~1\Temp\Maptitude\ttt.dbf"

tmp = GetRandFileName("Temp\\.dbf") // tmp = "C:\Program Files\Maptitude\Temp\ttt.dbf"

tmp = GetRandFileName("\\Temp\\.dbf") // tmp = "C:\Temp\ttt.dbf"

tmp = GetRandFileName("E:\\Temp\\.dbf") // tmp = "E:\Temp\ttt.dbf"

tmp = GetRandFileName("H:\\MyFiles\\MyData\\") // tmp = "H:\MyFiles\MyData\ttt"

 

See Also

Function

Summary

GetTempFileName()

Generates a valid and unused file name with a given specification

GetTempPath()

Gets the name of the directory used by Maptitude to store temporary files

 

 

©2025 Caliper Corporation www.caliper.com