Scripting Guide > Types of Data > Path Variables > File Path Separators
发布日期: 08/07/2020

File Path Separators

In JMP, the preferred file path format is the Portable Operating System Interface (POSIX), or UNIX, format with forward slashes (/) as separators. This means that you do not have to identify the current operating system in scripts run on both Windows and macOS. However, each host still accepts its native format for compatibility.

You can a convert file path format from Windows to POSIX (and vice versa) using Convert File Path(). Converting from a POSIX to a Windows path might be useful when you need to output a path to a file or to another application. The syntax is:

Convert File Path (path, <absolute|relative>, <POSIX|windows>, <base(path)>);

For example, the following script converts a POSIX path to a Windows path:

Convert File Path( "c:/users/smith", windows);

c:\users\smith

You can substitute a path variable (such as $HOME) for the path inside quotes.

需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).