OverviewExamples
Debug.ShowWindow(true); --Shows the debug window.
path_parts = {Drive="C:",Folder="\\MyFolder1\\MyFolder2\\",Filename="myfile",Extension=".exe"};
result_path = String.MakePath(path_parts);
Debug.Print(result_path);
In this example, a table called "path_parts" is first created containing each part of a path. The String.MakePath action is then used to create a path string based upon the elements of the table and then printed to the debug window. The created string would look like this:
C:\MyFolder1\MyFolder2\myfile.exe
Debug.ShowWindow(true); --Shows the debug window.
path_parts = {Drive="C:",Folder="\\",Filename="myfile",Extension=".exe"};
result_path = String.MakePath(path_parts);
Debug.Print(result_path);
This example is the same as example 1, however the Folder element only contains the required backslash. The debug window output would look like this:
C:\myfile.exe
Note: A backslash must be added to the Folder value, even if no folders are present in the path.
See also: Related Actions