FileSystemObject.BuildPath()
JScript3.0+Syntax
filesystemobject.BuildPath(path, name)
path String representing existing path
name Name being appended to existing path
Description
The BuildPath() method is used to append a name to an existing path. A separator is inserted between the existing path and the appended name if necessary.
Example
Listing 9.70 shows how to use the BuildPath() method.
Listing 9.70 Example of BuildPath()
<html> <body> <script language="JScript"> <!--Hide function GetNewPath(path) { var myObject, newpath; // Create an instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); newpath = myObject.BuildPath(path, "/newstuff"); alert("The result is: " + newpath); } // End Hide --> </script> ... |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.