Extract the file to the path

I'm working on a project which seeks to this folder a file is in before determining what function to perform.  Currently I use nomchemin var = decodeURI (app.activeDocument.path.name); to extract the immediate folder the file is located in, but in some cases, I need to retrieve the name of a folder of that one.  For example, currently gets 1\ C:\Texture Sets\LibraryLarge Format and returns the 'Large Format' folder to the path variable, because the file that I work with is located in this folder.  What I need is a way to check for 'Library 1' in the same way using the same file.  Thanks for any help!

dgolberg

You can use...

var parentFolder = decodeURI(app.activeDocument.parent.parent.name);
alert(parentFolder);

Tags: Photoshop

Similar Questions

  • ' Extract the path of ' path ' object

    Once you have used a path type, how do you get back? Everything I do to retrieve the path removes it.

    typepath.PNG

    Witht select direct selection tool (white arrow) only the path.

    If you select a single seghment, and then press and hold the command key or control down and xselect the other segment as it might look like the entire path is selected but that may not be the case if control or control and click on the other segment.

    The copy and paste or copy it and paste it in the front or rear.

    Ther above only one segment has been selected, I also had to order select the other understands even looks selected

    Now in the future if you need keep the path simply make the type on a path on a copy of the path.

    Hope this helps

  • Use regular expressions to extract .llb file from the path name

    I'm trying to be smart (always a dangerous thing) and use a regular expression to extract the name of a library to a filepath converted to a string.   While I appreciate there are other ways to do this, regex seems to be a very powerful way of neat, I would be able to operate.

    IE, if I have a string of type, C:\applications\versions\library.llb\toplevel.vi, I want to be able to extract the library.llb of the string, because it will be of variable length, may include the numbers & spaces and may be located in a file of variable depth hierarchy.   In other words, I want to extract the part of the string between the last-which ends with .llb

    The best I managed so far is \\+.*llb who all returned less the drive letter and the toplevel.vi

    Can someone help me to achieve this goal, or I'm better by using an alternative method (for example filepath string in array, search for .llb)

    Thank you

    Matt

    Hi Matt,

    attached you will find two other options.

    Mike

  • The term 'Select-Object-property' is not recognized as a cmdlet, function, script file or executable program. Check the spelling of the name, or if a path has been included, make sure the path is correct, and then try again.

    I have a fairly new version of PowerCLI (5,5 Rel 1) 5.5 being ESXi and vCenter.

    I also checked that automation. Core is installed:

    PowerCLI C:\Windows\system32 > Get-PSSnapin VMware.VimAutomation.Core

    Name: VMware.VimAutomation.Core

    PSVersion: 2.0

    Description: This Windows PowerShell snap-in contains the Windows PowerShell cmdlet

    TS of vSphere management.

    but after connecting to vCenter, I get error trying to run:

    PowerCLI C:\Windows\system32 > $Results = ForEach ($DRSRule to $DRSRules)

    > > {}

    > > «|» Select-Object-Property @{N = 'Cluster'; E = {(Id-vue-Get $DRSRule.Clust)}

    amplifier. {{ID). name}}.

    > > @{N = "Name"; {E = {$DRSRule.Name}}.

    > > @{N = "enabled"; {E = {$DRSRule.Enabled}}.

    > > @{N = 'Type of DRS'; {E = {$DRSRule.KeepTogether}}.

    > > @{N = "MV"; E = {$VMIds = $DRSRule.VMIds - split ","}

    > > $VMs = ForEach ($VMId to $VMIds)

    > > {}

    > > (Get-View-Id $VMId). Name

    {> >}

    {{> > $VMs - join ","}}

    {> >}

    > >

    The term 'Select-Object-property' is not recognized as a cmdlet, fu

    function, script file or executable program. Check the spelling of the name, or if

    a path was included, make sure the path is correct and try again.

    On line: 3 char: 32

    +     "" | Select-Object-Property < < < < @{N = 'Cluster'; E = {(Get-view-Id $DRSRule

    . {{Cluster.Id). name}}.

    + CategoryInfo: ObjectNotFound: (Select-Object-property string :)

    [], CommandNotFoundException

    + FullyQualifiedErrorId: CommandNotFoundException

    PowerCLI C:\Windows\system32 > Add-PSSnapin VMware.VimAutomation.Core

    Is ' Select-Object-Property not installed?  If not, where I get it, please?

    see you soon

    KC

    Note, I received this Dean here code: PowerCLI: extraction rules DRS; Deans blog

    There should be a space between the - Property parameter and Select-Object

  • Change the path of the files system such as 'Music '.

    There is not a lot of space on the internal hard drive SSD in my Macbook.

    For this purpose, I'd like to keep some data types with a huge volume to another location, for example on an SD card in the slot.

    For example, I want to store my music files on the SD card instead on the internal SSD flash drive.

    Of course, I don't want to see the empty folder "~ / music" in my file structure.

    Question:
    Can I change the path ' ~ / music ' to ' / my-sd-card/Music?

    Thanks for your help.

    If you completely destroy the music folder in your startup volume/users/music folder (or the folder documents) there is a possibility another application can go get it or try to add files to it, then you should try and keep intact even if you do not plan to use or put the files into it.

    You can send a request to look in another folder for music.

    for example my iTunes on my El Capitan boot drive is mapped to watch my music in my folder shared user of Yosemite, and on another mac, it's on an external hard drive in a folder called 'music '.

    So what application do you need to do this in?

    In the case of iTunes, you can redirect the folder from the Advanced section in the iTunes preferences by clicking on 'change... '. "and navigate to the new location.

    record music from my boot drive is intact, but there is no files inside.

  • Updating FF 24/25, my browser hang, I uninstall the browser and tried to reinstall, but extract the Setup file and blocks until pls give a solution

    Updating FF 24/25, my browser hang, I uninstall the browser and tried to reinstall, but extract the Setup file and blocks until pls give a solution

    I solved the problem, installed the installer from mode Windows safe.

  • I try to install FF on a thin client and need to change the location as the installler extracted temporary files so that the disk is not big enough.

    Is there an extracted version of Installer pre or a way of specifying where the installer extracted itself to?

    You can 'extract' the Windows of Firefox 4 versions + yourself by opening the package Firefox Setup #. 0.exe with 7-Zip and extract the contents of the \code\ folder in a new program files that you have created in advance.

    This way of "installation" of Firefox is not write to the registry, then you will not be able to set it as default browser, WIndows can't "feel".

  • During the installation of FF10 in W7, the installation will stop after having extracted the installation files. Also happens for FF9.

    I want to install Firefox 10 in W7. He extracted the installation files, and then wonder under what name/user I want to install; or as a current user as an administrator (which is strange, because the current user IS administrator). Which option to choose here, the installation is interrupted. Windows Task Manager displays just the judgment of trial. The same thing happens with FF9, what's up? I want to install Firefox 10 in W7. He extracted the installation files, and then wonder under what name/user I want to install; or as a current user as an administrator (which is strange, because the current user IS administrator). Which option to choose here, the installation is interrupted. Windows Task Manager displays just the judgment of trial. The same thing happens with FF9, what's up?

    I'm glad you solved.

    I am new to Windows 7, having already used XP but I seem to remember that type UAC guests can have a flashed up in an account Admin, while the installation of Firefox, but then just process at the facility without me having to explicitly a password or something.

    I note our standardized instructions

    do not mention something special you need to ' right click > open as administrator ' in W7

  • How to extract the files from the HARD drive?

    I have a HDD1805 from a broken iPod 80 GB. I was wondering if there was another method I could use to extract the files from the hard drive.

    Hello

    Sorry, but I don t know what you mean exactly.
    Can you please explain exactly what you mean?

    What files you want to extract?

    Good bye

  • I'm doing a script that takes a list of e-mail from a text file and then allow me to select a save as a string. I found some ways to get the path of the file, but I'm in check by pulling the list

    I found some ways to get the path of the file, but I am defeated by pulling the list from that. the function of the path get gives me the path as "Macintosh Users:: Documents: extractedb.txt (myUsername).

    What I can't understand is how to get a dialog box to display a list that represents the content in the text file, I need to change the contents of the text file, I need the box to show me what I chose and I want to save my selection as a single string.
    e '.

    example of extractedb.txt information:

    [email protected]

    [email protected]

    [email protected]

    * has a random number of emails as well *.

    I want this is to pull those emails from the text file and turn them into a list so I can get to be a selection in my dialog box.

    Any help would be great = D

    Assuming you have a text file with your example e-mail addresses, the following AppleScript will read this file in a list (mf_List) and then use this list as input to choose among the list. Because multiple selection is allowed (control button), the output is sent to a list (sel_addr). We check if the Cancel button was pressed by testing for false and if this condition is met, we the script error.  Based on a single or multiple list item content of the list, display accordingly.

    game of mf to ((path to the folder as text) & "mail_list.txt")

    the value mf_List to {}

    the value sel_addr to {}

    the value mf_List to paragraphs of (read file mf)

    the value sel_addr to (choose from the list mf_List with title ¬

    ('Mail list' with multiple selections allowed without empty selection allowed)

    If sel_addr is equal to false then

    Error number-128

    return

    end if

    If length of sel_addr is equal to 1 then

    sel_addr display dialog box as text

    on the other

    the value Point to the text of TID to AppleScript delimiters

    the value Point text in AppleScript return delimiters

    display the dialog box elements of sel_addr in the text

    the value Text of point AppleScript delimiters to TID

    end if

    return

  • No luck trying to extract the .inf files from the drivers downloaded as zip files

    Hello

    I try to extract the .inf files from the drivers downloaded as files zip on the Toshiba site, but I'm having no luck.

    I'm trying to deploy images by using WDS on Server 2008 and need inf files if it is to succeed, there the answer to this problem.

    Thanks in advance.

    Hello

    I can unpack any driver package downloaded from the Toshiba driver page.
    I use the free tool called WinRAR.

    Maybe it helps you

  • How to extract the Setup for the current operating system file?

    I run an early 2011 Macbook Pro (8 GB of RAM, 500 GB HD). My main use of the computer is software development, and so far I've been able to do what I have to do with the Mountain Lion.

    Expository made. I downloaded the Setup file of El Capitan on the Apple Store and am prepared for a new installation - however I would always have the .iso for Mountain Lion image file should I choose to go back.

    I found sites that allow image .iso for free downloading - however cool gave Apple $20 to download from their website - I'm hesitant to run out of what I guess that they are treated as counterfeit software. Is there anyway to extract the .iso of my latest version of Mac OS x image file?

    Thank you

    O

    N ° log in to the Mac App Store with the Apple ID you had attempted to get the Mountain Lion and it re-download from the purchases tab.

    (140118)

  • upgrade to windows 10, cannot open itunes, it opened the first time, and imported all my songs, but does not open a second time, get the error that the path is not correct and file not found

    upgrade to windows 10, cannot open itunes, it opened the first time, and imported all my songs, but does not open a second time, get the error that the path is not correct and file not found

    Try to repair the security permissions for iTunes for Windows and the empty/corrupted after upgrade/crash iTunes library.

    TT2

  • Specify the path to file report with Expression

    TS201x help under "Specifying report file paths by Expression" talking with a number of macros various, but starts at the page that shows how to use FileGlobals also. When you specify the expression (... > specify the path file of report by Expression > Expression browser), I would like to combine macros with FileGlobals, but none of the FileGlobals are listed is available. The expression builder has access to the StationGlobals however, but not in the FileGlobals.

    Is there a workaround solution, or at least an explanation of this behavior?

    See you soon

    I think you found a bug in the documentation.  In the process of old models, you can use the FileGlobals of the process model as that sentence States.  Now that they moved to Plugins I don't think that this is no longer true.  You may need to go with a StationGlobal on it.

    Or you can cancel the ReportOptions recall and change the Parameters.ReportOptions.ReportFileSequentialModelExpression variable to include the information in your customer file.  So, basically, to define a placeholder in your expression in the dialog box options report.  Then in the callback to use the SearAndReplace method to replace the placeholder with the specific data.  It worked for me when I tested it.  The nice thing about this way, is that you don't have to manage the StationGlobals.

    Hope this helps,

  • Look for the path just by showing all files

    Is it possible to configure the LabView brose dialog box to show all files, but only allow the selection of existing paths (such as records of selection only mode)?  I have many paths to choose from and I would like the user to see files within these paths (so they know that they choose a populous path) but I don't want to select these files.

    Thank you

    XL600

    HI xl600,.

    You can use the path of the band when the user select a file and force the value of path.

    I made you a VI.

Maybe you are looking for

  • IMAP operations freeze sometimes Thunderbird

    I just changed using a new computer with Windows 8.1. Thunderbird (latest version 31.2.0), now sometimes hangs (not responding), for a minute or two for the IMAP operations. It didn't happen in Windows 7, and all parameters are identical. I have not

  • IMessage crashes

    When you try to read an old message of 7 month back the Imessage app crashes once I come back 5 months. So I all that again but once I get to this 5 month period it breaks down again. Any recommendations? Help please? Thank you!

  • QuickLook 3 - error (not found user information)

    Hello! When I try to open QuickLook 3 on my laptop HP ProBook 4510 s, I get the following error: Error: No user information found. Cannot continue. Do you know why is that? Thx for your help

  • QuickTime is not running

    I get an error message saying that «Unavailable Quicktime»

  • Checking the time of calibration

    I have a requirement to perform a daily calibration of an instrument on a daily basis.  Time of calibration should be configurable by the user.  So what I've done is created a menu item which allows the driver to control the time of the user.  In add