15.05.2019, 09:26
|
Script Master
|
|
Join Date: Sep 2013
Posts: 1,553
|
|
Quote:
Originally Posted by sherbee
Questions I have ...
|
Code:
var myString = "c:/sherbee/check/file.txt"; // string
var myFilePath = getPath(myString); // Converts myString to myFilePath object
var myString = myFilePath.toString(); // Output : "c:\sherbee\check\file.txt"
var myString = myFilePath.getParent(); // Output: "c:\sherbee\check"
var myString = myFilePath.getName(); // Output: file.txt
var myString = myFilePath.getExtension(); // Output: "txt"
- I had intitally used a path object while testing a different version of the script, which required converting it to string. I forgot to remove it in the final script.
|