Go to: Synopsis. Return value. Keywords. MEL examples.

Synopsis

string toNativePath( string )

Convert from '/' to '\\' path formats on Windows, otherwise does nothing. Use this proceedure to convert pathnames retrieved from Maya to more Windows-like backslash-separated pathnames (note that most Windows system calls do handle forward slashes as path-delimiters).

Return value

None

Keywords

MEL Windows path file ,

Arguments

Variable Name Variable Type Description
$pathstring The path to be converted.

MEL examples

      // Find a file in a subdirectory of the current one
      string $file = `workspace -q -fn`;
		// Result: D:/Projects/projectOne/scene2 // On Windows
      string $path = toNativePath( $file );
		// Result: D:\Projects\projectOne\scene2 // On Windows