2 Replies Latest reply on Nov 29, 2011 1:50 PM by dgolberg

    Extract folder from Path

    dgolberg Level 1

      I'm working on a project that looks for what folder a file is in before determining what function to run.  Currently, I'm using var pathname = decodeURI(app.activeDocument.path.name); to extract the immediate folder that the file is located in, but in some instances I need to get the name of a folder back from that one.  For example, it currently gets C:\Texture Sets\Library 1\Large Format and returns the folder "Large Format" to the pathname variable since the file I'm working with is in that folder.  What I need is a way for it to check for "Library 1" in that same path using the same file.  Thanks for any help!