Current Page:
NeXtMidas Training
Working with Files
Basic File Commands
FNAME - Forming file names
|
|
- The
FNAME Command:
- The
FNAME command is used to form or parse file names.
- The component parts
AREA= , NAME= , EXT= ,
and OPT= are put together to form a full file name. For example:
nM> fname label=fullname area=dat name=airports ext=csv opt=sys
nM> res fullname
41S: FULLNAME = /home/burdell/nxm230/nxm/sys/dat/airports.csv
- It is also possible to go in reverse and extract
AREA= (in this case
area gets the directory path),
NAME= , EXT= , and OPT= from a full file name.
For example:
nM> fname label=fullname area=mypath name=myname ext=myext opt=myopt /parse
nM> res my*
3S: MYEXT = csv
8S: MYNAME = airports
41S: MYPATH = /home/burdell/nxm230/nxm/sys/dat/
- Why use this? -- To improve portability between Linux and Windows
by not including path delimiters!
- The
FILE NAME function may also be used to form platform-agnostic
file names.
X-Midas Users Take Note: |
Like most commands in NeXtMidas, the FNAME command can be used with both
Midas files and non-Midas files alike.
|
|
|
|