View Single Post
  #725  
Old 15.05.2019, 09:26
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by sherbee View Post
Questions I have ...
  1. 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"

  2. 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.
Reply With Quote