|
Setnames |
Top Previous Next |
|
Establishes or redefines three control variables so they contain the drive subdirectory, filename and extension of a file named with full path.
$setnames filename v1 v2 v3
where filename is any file name
Thus (condcomp.gms)
$setnames d:\gams\xxx.txt filepath filename fileextension
separates the filename d:\gams\xxx.txt into its three components placing d:\gams\ into filepath, xxx into filename and .txt into fileextension. The three items may be recombined back into the original filename string by using %v1%%v2%%v3% in a command like (condcomp.gms).
$setglobal name %filepath%%filename%%fileextension% |