JS CS4 share the path to the document

I'm trying to divide the path of the document file so that I can navigate to one or two files, then in a specific subfolder.

When I try to divide the "myDoc.filePath" it errors. If I shared "myDoc.name", it works correctly.

myDoc var = app.activeDocument;
var myDocPath = myDoc.filePath;
mySplit var = myDoc.name.indexOf ('_');
var myFileName = myDoc.name.slice (0, mySplit);
var myPdfFolder = myFileName + "pdf";
var mySavePath = myDocPath
var mySplit2 = myDoc.filePath.indexOf (myFileName);
var myFinalPath = myDoc.filePath.slice (0, mySplit2) + myFileName + "/" + myPdfFolder;
Alert (myFinalPath);
Can someone shed some light on how to divide the path of the document?
Thank you
John

Path: ~desktop/N123456/working/N123456_01

Note: the name of the last still non-existent folder. Often the 'work' folder is the last. Working folder and N123456pdf are at the same level.

Goal is to change the economy to the path of the document: ~desktop/N123456/N123456pdf

You will have about it the hard way.

Work better with the property of the parent file (which is the folder that contains the file), and then it's the parent.

The specific question that you are using is slice works on strings and you try to use it on a file object.

Dave

Tags: InDesign

Similar Questions

  • Share the Document does not?

    Sharing does not? Nobody gets the prompt Email and their Email address, after the guest were sent, do not appear anywhere as currently being shared. (using the desktop version which is online and shines green)

    You have a good point that you can't force others to register and pay to use story just to provide feedback on your script. Our team will take care of this point when we decide the pricing for the history mechanism.

    But for the moment history is completely free so maybe you can ask others to register and use it. To make the share more easy story has also 2 special types of roles - Reviewer (can provide feedback on the shared document) and the reader (can only read the document). If you assign appropriate roles while sharing the document.

    Thank you

    Adobe Story team

  • Share the Document box doesn't work is not on the page of managed document attachment add

    Hi all

    I am facing a problem while trying to 'share' a page of accessory managed document document Add.

    When I click on the button 'Add' on the managed accessory screen, I can see that the group default security to AFdocuments in Info mode only.

    When I click on the check box "Document sharing" nothing happens, security groups has failed to AFdocuments in Info mode only.

    According to me, the security group should be replaced by a drop-down menu with the list of groups to which the user has permisison to writing.

    Please help me solve this problem.

    Some details about my environment.

    His middle EBS 12 on what automatic processing invoices and attachment managed solutions are enabled.

    WebCenter version is 11.1.6. Our users sit in Active Directory and have a different username / password for EBS and manage attachments.

    Your input is much appreciated.

    Thank you very much for taking the time to read this thread.

    see you soon,

    Patricia

    It is now resolved. I have updated the component more recent appAdapterCore.

    see you soon,

    Patricia

  • How to share the document (text + photo) on facebook & twitter?

    Hello

    I have to add the mechanism of action at my request,

    I downloaded the "FacebookBlackBerrySDK - v0.8.25.jar" and when I use this jug I get the error:

    Error at startup 'My application': Module ' FacebookBlackBerrySDK - v0.8.25.jar ' not found

    I use this code

    String NEXT_URL = http://www.facebook.com/connect/login_success.html";
    String APPLICATION_ID = "153555168010272";
    String APPLICATION_SECRET = "354f91a79c8fe5a8de9d65b55ef9aa1b";
    String[] PERMISSIONS = Facebook.Permissions.USER_DATA_PERMISSIONS;
    ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS);
    Facebook fb = Facebook.getInstance(as);
    

    the jar file source: https://sourceforge.net/projects/facebook-bb-sdk/

    Please I need help

    Click the checkbox to the OrderAndExport RightClick on project Buildpath-Configurebuildpath and select order and export click this box run the application.

  • I want to insert the path to the documents in the header, how to accomplish this?

    I'm trying to implement a standard header for all work related documents. In the header, I need to show the path to the document. I use to have a model which included the path but I ain't. Is it possible to make a template for a header that displays the path to the document? If yes how?

    It would depend on your word processing program.  Almost all offer headers and many offer various 'macro' features that can insert information in the header.  See the documentation of your word processing program or find a forum that takes care of your word processing software and ask there.

  • find the path of a document

    How can I find the path to a document in microsoft word?

    Open the document, then do a "save under".  That will show you in the place of the document came.

    I hope this helps.  Good luck.

  • How to see the file name of the document with the full path when you move mouse title bar?

    PS CS6 using, Windows 7 x 64.

    I was under the impression that when my mouse hovering over the title bar of the document, I would see a ToolTip showing the full file name, including the path.  This isn't the case and I wonder if there is a way to do it.  I know that I can click on file > save as, or Ctrl-Shift - S to see the full path, but hoving over the title bar would be easier.  (What I now see in the ToolTip is the name of the file, % magnification and layer that I selected.)  Basically, the ToolTip is showing just what is in the title without hovering bar.)

    Thank you!

    John

    AHA, I think it's a view tabbed vs thing windowed mode...

    I do not think that trying to change the way you manage your documents, well that--most people like one way or the other and stick with it.

    -Christmas

  • change the size of the document in Illustrator CS4

    Hello

    How can I change the size of a document in Illustrator CS4?

    Seems a simple question, but I can't find the answer...

    I looked in the document in place (in CS2 I change it here)

    Thank you

    Tone

    What has been the preparation of the Document in the older versions to set the page size is now integrated into the artboard tool. Double-click the work plan tool to access these settings.

  • CS4 has "Back" and "at the end of the document.

    Scene1

    I'm in TextEdit , whipping through a FIND, speeding as usual and all of a sudden "Whoa" I missed that one. No problem. Just press previous. This is a very useful option.

    Q1: Is there a similar option hidden somewhere in CS4?

    Scene 2

    I am looking through a CS4 document to help find and wanted to jump out of the for making any changes. I finish the Assembly, and then I want to keep FIND it right there where I was stopped at the end of the document. CS4 does not offer this option. It goes to the end and then looping back to the beginning and takes me through the lot. IE if you are almost at the end of the document and do not look at where you are, you can eventually find the document twice.

    Q2: Can I configure FIND to boot from the insertion point and complete his research at the end of the document?

    A1. Alas, no.

    A2. Alas, no.

    I also miss the two of them on an almost daily basis.

    Submit them to InDesign Feature Request; Maybe someone up there is listening.

  • Intermittent permission problems on the Documents directed to the network share folder.

    Everyone knows this intermittent problem before?   We have Vista workstations where each employee is allocated storage (disks Home) on a network drive (on a NetApp storage device).  Each employee Documents folder is redirected to a folder dedicated to this place.

    The vast majority of employees is having no problems with this configuration, but we recently did not have a low percentage of employees who are starting to have problems with strange permission on this network through their Documents folder drive.

    First of all, NTFS permissions have been confirmed as correct on the respective folder of each (each has been granted full control).   In each case, random, users encounter intermittent "access denied" errors when you try to save files (Word documents, Excel, files jpg even spreadsheets) on their own drive of home.  Typically, the problem occurs independently to know if they are trying to save the docs within an application (Word, Excel, etc.) and manually via a Windows Explorer window.

    For example, a user could save an Excel file in a subfolder in the folder root documents, but a few moments later could not save a jpg file in the same folder.  It has been verified that it has full control over both the folder root of Documents as the subfolder containing the documents.

    Another user can save files Word and Excel in its Documents, but then failed to open their shortly after (access denied).   It has been verified that he has full control of both the root folder of Documents than the subfolder containing the documents.

    NTFS permissions are well positioned, but yet, we have still some weird permission issues.   Y at - he recommended registry entries to check as we redirect Documents to a network drive?

    Hi smamm,

    Your questions are better asked on the TechNet Forum for more expert on this post question your request here help

    TechNet Forum
    http://social.technet.Microsoft.com/forums/en/itprovistasecurity/threads

    Thanks and greetings
    Ajay K
    Microsoft Answers Support Engineer
    ***************************************************************************
    Visit our Microsoft answers feedback Forum and let us know what you think

  • [JS] [CS4] List the fonts used in the Document

    Hi to all the gurus, scripting

    I have the following script that returns a list of the fonts used in the document:

    function fontused(){        

          var fontscoll = document.fonts;         

         for(var i = 0; i < fontscoll.length; i++){            

              var font = fontscoll[i];            

              alert(font.name);          

         }

    }

    The above works OK my problem is that it also lists the fonts used in placed illustrator (.eps) files. Is there some kind of setting or something that I can use so that the list only the fonts used in the text?

    -Horse

    Hi Charles

    Try this

    var  myDocFonts=app.documents[0].stories.everyItem().textStyleRanges.everyItem().appliedFont,
            l = myDocFonts.length, myFonts="";
            uniqueFonts = {}, n;
    while (l--) uniqueFonts[myDocFonts[l].name] = myDocFonts[l].name;
    for (n in uniqueFonts) myFonts+=(uniqueFonts[n])+"\r";
    alert(myFonts)
    

    Trevor

  • Different documents share the same styles?

    Is it possible to share the same text and styles of paragraph between different files? Or export and import? Thank you!

    Yes, is the short answer.

    On the new file, go to the paragraph style Panel and using the drop-down menu, select "load paragraph styles" or "load all text styles ', then click the file you want to copy from.

  • How to set up default InDesign CS5 in the system with InDesign CS4 has the default value?

    How to set the application default .indd InDesign CS5 when you installed CS5 and InDesign CS4 and InDesign CS4 is the current default (InDesign CS4 has been installed after the installation of CS5)

    Thanks, but I already tried at first, but is not effective.

    I think that its because of this reason:
    The two - InDesign CS4 and InDesign CS5 have their application/program/exe named "indesign.exe".

    Installation of either InDesign CS4 or InDesign CS5, sets a default for the 'indesign.exe' Windows path. In this case, since InDesign CS4 was installed later (after InDesign CS5 was already installed), the "indesign.exe" which has been staged "Indesign.exe" of InDesign CS5 has been replaced by "Indesign.exe" of InDesign CS4.

    But after long google and searching through regedit, I have the solution:

    1. Search for HKEY_CLASSES_ROOT\InDesign.Document\Shell\Open\Command in regedit
    2. Change the value of the attribute (default) for "C:\Program Files (x 86) \Adobe\Adobe" '%1' / / including the quotes

    Post edited by: Vidit Kothari

  • looking for someone to help me with this problem. "It is no set application to open the document"stream_000b.strings ". "How can I get rid of him. pls help

    I get this message when I turn my macbook pro on "there is no set of application to open the document"stream_000b.strings ". "How can I get rid of him. pls help

    Check preferences system/users and groups to see if this item is in your login items. If so, select it and use the sign less to remove.

    If she is not there, see if you can find the file by using one of these programs. If you go Finder/display/show bar path, it will show you where it is located. You can then remove it.

    EasyFind-replacement of Spotlight

    Find any file

  • The documents are repeatedly downloading and opening, how do I stop this?

    I recently downloaded itunes. Since then, Firefox is repeatedly download the documents that I have downloaded previously. This is particularly a problem with two documents that download and then open in OpenOffice. This happens whenever Firefox opens. I deleted the temp folder on the computer and the list of downloads in Firefox. Once they were emptied, they are again filled previous downloads.

    Can I stop this?

    Hello

    Try Firefox Safe mode to see if the problem goes away. Safe mode is a troubleshooting mode, which disables most of the modules.

    (If you use it, switch to the default theme).

    • Under Windows, you can open Firefox 4.0 + in Safe Mode holding the key SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • On Mac, you can open Firefox 4.0 + in Safe Mode holding the key option key when starting Firefox.
    • Under Linux, you can open Firefox 4.0 + with leaving Firefox then go to your Terminal and running Safe Mode: firefox-safe-mode (you may need to specify the installation path of Firefox for example/usr/lib/firefox)
    • Or open the Help menu and click on the restart with the disabled... modules menu item while Firefox is running.

    Once you get the pop-up, simply select "" boot mode safe. "

    If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to understand that one. To do this, please follow article Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems .

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.

    When find you what is causing your problems, please let us know. It might help others who have the same problem.

    ________________________________________________________________________________

    Sometimes a problem with Firefox can be a result of malware installed on your computer, you may not be aware of.

    You can try these free programs to search for malicious software that work with your existing anti-virus software:

    Microsoft Security Essentials is a good permanent antivirus for Windows 7/Vista/XP, if you do not already have one.

    More information can be found in the article troubleshooting Firefox problems caused by malware .

    This solve your problems? Please report to us!

Maybe you are looking for