File and Filename Routines

The File and Filename routines enable you to manipulate filenames.

A filename is split up into three discrete parts: path, basename and extension. Using the following example - d:\dir1\dir2\file.dat - the path is d:\dir1\dir2, the basename is file, and the extension is dat.

Filenames can be either space-terminated or null-terminated. Space-terminated filenames are terminated by a space character, and if they contain any embedded spaces, the whole filename should be enclosed in double quotation marks. Null-terminated filenames have any double quotes stripped out, but retain any embedded spaces.

The routines in this section can work with filenames up to 65,535 characters long, but your environment and run-time system will impose a limit on what filename lengths can actually be used on a file system.