How to capture the name of the image of the path of the file links in indesign

Hello

I enter the full path of the links used in indesign via javascript. However, I need to enter only the name of the image of the path of the file.

For example:

Via script I enter the path of this image as:

/Users/user-name/desktop/image.PS

However, I need to capture from the path the image name that is, I want only image.ps

I tried to make grep, replace, but not too sure how carry forward.

Any help will be appreciated.

Here is my script by which I get the path of the link.

myDoc var = app.activeDocument;

myLinks var = myDoc.links;

If (myLinks.length == 0) {}

ErrorExit ("this document contains no links.", true);

}

for (var i = myLinks.length - 1; i > = 0; i--) {}

var currentLink = myLinks [i];

var LinkPath = currentLink.filePath;

Alert (LinkPath);

}

}

Kind regards

Aerts

Hello

Call the displayName of a file:

var fileName = File(LinkPath).displayName;

Jarek

Tags: InDesign

Similar Questions

  • How to capture the file name using af: inputFile?

    We had a user download a file without file in an application extension, we built using JHeadstart. Looking through the jdeveloper forum, it seems that the way to 'prevent', it is through the valueChangeListener. I understand that this must be a fix server side, the client is therefore always able to download this file, but then I want to check and return an error message and throw the file if it is not an extension. How is this possible when JHeadstart has already created a valueChangeListener?

    JDeveloper 11.1.1.4
    JHeadstart 11.1.1.3
    Oracle 11g
    ORDDoc column

    Thank you
    Michelle

    Michelle,

    You can make a subclass of JHeadstart FileHandlerBean, override the uploadFile method, check the ecxtension in your class and then call super.
    Create a custom template for the fileHandlerBean.vm (or fileHandlerBeanInTable.vm) to use your custom subclass.

    Steven Davelaar,
    JHeadstart team.

  • How to capture the value of profile in AM

    Hello

    How to capture the value of profile in AM.

    Krishna

    Here is the code that you can use

      String profileValue=  getOADBTransaction().getProfile("profile Name");
    

    Thank you
    -Anil

  • How to capture the data of type string with agent script and then compared to an alarm

    Hello...

    How to capture the string with agent of script data and then create a rule to compare the string data to generate alarm?

    Thank you!...

    Start here:

    http://en.community.Dell.com/TechCenter/performance-monitoring/Foglight-administrators/w/Admins-wiki/6155.custom-script-agent-1-leverage-an-existing-monitoring-script-to-push-data-into-Foglight

  • Windows 8.1 in Adobe Illustrator, I tried to copy my design & tried to paste it, but after sticking the image (file), now the color looks different, drive and lighter. So, kindly inform how to paste the file with 100% same resolution / color / appeara

    Windows 8.1 in Adobe Illustrator, I tried to copy my design & tried to paste it, but after sticking the image (file), now the color looks different, drive and lighter. So, kindly inform how to paste the file with 100% same resolution / color / appearance. Thank you.

    Hi GANESHKUMARAPILLAI CHRYSTELLE,.

    Here is a link for color management workflows in Illustrator.

    It is best to place the image instead of paste into Illustrator. When you paste the images they are in RGB color format. Make sure your document is a RGB file

    Click on these links for more information.

    Understand the workflow of the CC of individual course Illustrator color management: Advanced

    Creative Suite * keeping colors consistent

    Implement the print color management workflow. Illustrator, InDesign, Photoshop

    Concerning

    Scott

  • How to capture the values

    Hi friends,

    I came across one of the scenarios, i.e.

    In my application, I have a report page and a form page, the report and the form are based on the unique table...

    If a record is inserted medium, means it will be inserted in the report...

    in the region of report I have an button called then if I clicked the next button means a form page must open to capture all values which is inserted in the report of each field of the form...

    How to capture the values of the ratio to form shortly after clicking on the button NEXT in the region of report...

    Help me solve this question friends,

    Thank you
    Saro...

    Hello

    For the Next button , which is located in the region of report,

    change the Action: to redirect to the page and give the respective page number: (i.e.) the target...

    And specify the value of these items: what are all the elements of the target.

    with these values: describe the elements of the source where you will take the values of the corresponding points...

    Izz all wells
    GTA...

  • How to capture the value of type column report

    It would be a great help that you might suggest the following

    (i) Java script that I wrote on the standard status column (in a tabular report) fails.
    This happens because of the standard status column, if I use the text field then called Javascript function and showing correct results.

    Now, here, I want to know how to capture the value of the column standard report, since javascript fails due to
    the column values of standard report unrecognized.

    Example:

    Columns of the report as a table:
    ```````````````````
    Standard report column: salary
    TextField report column: new treatment
    Report column standards: difference

    I've written the javascript on column New_salary function which returns the value of the salary column to calculate the difference.

    For this column of report types, the javascript function does not work, that is to say, it does not show the difference., since it is not read
    the value of the column Salary (which is the Standard type of report column)
    Once I have change the Salary column to text (display as saved state) javascript field works fine.

    All entries on how to capture the standard value of the column, so that I can access the value of the javascript function.

    Thanks in advance
    Vijay

    Hi Vijay - I had problems with the forum as well (and my workspace OTN so)!

    You have two questions, I think.

    First of all, that the old wage is not an input element, you can not get to it by referring to an ENTRY tag. you will need to change that to something like:

    var s1 = d[k-1].firstChild.nodeValue;
    

    This means that there is nothing else in the cell apart from the text - as in < td > < table > 123. If there is something else there that stops you getting the value using the above, you can go through these nested tags referring to objects further firstChild-

    var s1 = d[k-1].firstChild.firstChild.nodeValue;
    

    As I don't see your page, you need to check yourself to see firstChild how much you need. This example assumes that you had something like: < td > < b > 123 < /b > < table >

    Second, the values of s and s1 are strings. You must convert these numbers to be able to perform calculations. You have two javascript functions to do this: ('string') parseFloat and parseInt ('string'). One contains decimals, the other is not - but know that one is not very accurate (it can change "123.456' in ' 123.455999999995' or something similar - not very good! '").

    So, your calculation should be:

    var diff = parseInt(s) - parseInt(s1);
    

    Andy

  • How to move the FILE from one place to another and keep "Indexing" have to move to the unknown location so you can't discover its full file path? Windows instructions provide information wrong re: how to do this!

    Make a bunch of audio files, placed in a folder on my desktop. Files initially sent to RealPlayer to burn, but when finished burning CD and went to read a CD, folder got seized by Media Player, 'Indexed' and disappeared from the office. I'm a relatively new computer user, and I need to learn more about file paths, how to view the path FULL of a file on my computer and how to type (create) full path when I need to. The "Indexing" feature seems to erase this lesson for me, and after having spent four hours trying to find Vista instructions on "How to move the file from one place to another", I gave up! Windows 'Help and Support' on my computer gives wrong directions. It states that if I right click on a folder > properties, a dialog box opens with a tab by which I can move my account. There is no tab location here. I found locations tab when right click on the "Mobile" folder, but still no option to "move file". No idea what is the folder "Roaming" or why it's on my computer. I want my audio files in the My Music folder, but this place is "access denied." Don't know how to get the audio file it in any case, but if anyone has any advice, I would be very happy! Thank you. PS - I had no problem moving folders in XP. I don't like the idea that a computer is to decide where to put my files. I want to control where I put my files. I don't like the way search works under Vista. I liked the XP search companion better because, for a computer fool like me, it was really easy to organize and find files and folders and had an option specific to find audio and video file TYPES.

    Here is an article on how to move your personal folders in Vista: http://www.howtogeek.com/howto/windows-vista/moving-your-personal-data-folders-in-windows-vista-the-easy-way/.  If you're talking about the special folders (such as photos, Documents, office...), then here is an article on how to move: http://www.winhelponline.com/articles/95/1/How-to-move-the-special-folders-in-Windows-Vista.html.

    If you have trouble with the search after you move the files, then rebuild the index: http://www.tech-recipes.com/rx/2103/vista_rebuilding_the_search_index/.  Here is an article on how to use Indexing Options in Vista that may be useful for you: http://www.vistax64.com/tutorials/69581-indexing-options.html.

    If the above does not help, your problem seems to relate to the image of the files/folders and their interactions with Media Center (which operate on different other folders).  Please repost your question in images and video Forum at: http://social.answers.microsoft.com/Forums/en-US/vistapictures/threads where the people who specialize in issues of the image will be more than happy to help you with your quesitons.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • VM simulator - how to access the file system.

    I was wondering if anyone knows how to access the file vmware playbook simulator system.

    I don't want access programmatically, I covered, for access to the file system to copy files to the Simulator in shared directories.

    When you connect a playbook on the USB, it shows up as a drive, and I would like access to the same playbook vm dir structure to copy files for testing. for example if your s app access the pictures on the camera, I would like to copy some images for the test. Any ideas?

    TIA - dave

    Search the forum for more information on using 'ssh' to access the Simulator and more specifically help 'scp' or 'sftp' to transfer files to. You will do this in the files under/accounts/1000/shared, and if you're on Windows you will probably be to install PuTTY to do this. Feel free to ask for help more once you have dug through it all.

  • All of a sudden I've locked the folders and files on my system. How to unlock the files?

    I'm as Windows 7 Home Premium 32-bit slot. All of a sudden I've locked the folders and files on my system. I am the administrator and the only user of my computer. What happened to cause this? How to unlock the files?

    I right click on them and there is no label of 'ownership '.

    Angi

    Hello

    ·          How do you lock the folders?

    ·          The question came with all the files and folders?

    Step 1: Here's how you can take ownership of the files/folders

    a. right click on the file or folder and then click Properties.

    b. click the Security tab.

    c. click on a user name or group under group or user names.

    http://Windows.Microsoft.com/en-us/Windows7/what-are-permissions

    Step 2: Run the fix it to http://support.microsoft.com/mats/windows_file_and_folder_diag/

    Diana

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I have an Apple Macbook Pro. My photos are in the iPhoto files. How to transfer the file I want to work on Photoshop?

    I have an Apple Macbook Pro. My photos are in the iPhoto files. How to transfer the file I want to work on Photoshop?

    Where the iPhoto photos are located and how to access the photo library, iPhoto and image files

  • How to read the files on time capsule

    How to read the files on time capsule from iPad?

    Thank you

    Using an application like navigation on the iPad. More info here:

    Stratospherix - FileBrowser - overview

  • How to delete the files from my HP ePrint app after download / print?

    Can someone tell me how to delete the files from my HP ePrint app after that I downloaded and printed. Thank you

    jmsandkds,

    I apologize for the confusion. Options you speak of "photos, web and file" are located on the phone somewhere, lets say you click files. When you click on files, it will search the phone for available files that are able to print the ePrint app. To the extent where they are on the phone, you will need to search for them via the search screen, connection to the computer, or some files are program specific and only available in this program to be read, edited, or deleted.

    I hope this helps.

  • Anyone know how to sort the files in windows 7.

    Anyone know how to sort the files in windows 7. All of a sudden my file says "a long..., there is this month...» Last week... today. I can't deal with all the files in the folder now. How can I keep rid of one a long time ago..., this month... Last week... today) so that I can fix the whole folder?

    Hello

    Right-click on an empty area of the concerned window, select Group By, and then select None.

    Best wishes

    DP - K

  • How to reinstall the file MSVC90.dll

    My computer cannot read the real player as it says im lack the file above. some can guide me on how to reinstall the file.

    Hi tonyuniformat


    You have Microsoft Visual C++ 2008 installed on the computer?


    Method 1:

    You can try to reinstall the program and check if that helps.

     

    Method 2:

    If the problem persists you can check if you install Microsoft visual C++ 2008 helps that solve you the problem. Refer to the below link to install the same.

    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en

     

    I hope this helps.

Maybe you are looking for

  • Configuration of e-mail with the new iOS accounts

    I've just upgraded to the latest iOS and now discover the configuration for my email accounts has changed significantly.  It is almost useless.  I hope it's a temporary problem!  How can I get back "original"?

  • Reentrant PtbyPt increment

    Under the heading other PtbyPt functions, we increment Ptby Pt and decrement, PtbyPt.  Real estate execution VI, reentrancy is set to Preallocated incoming clone of execution.  Does this mean I can use VI to count several things? If this VI can be us

  • Have W2071d monitor, display settings do not allow non-native resolution matrices

    '' Recommended '' this monitor width setting is 1600 X 900, but when I go to the "Display" dialog box, the only options available to me are that were available using my old monitor. The monitor "selected" for common use (under "Advanced"-> tab monito

  • I lost the ability to search my emails. In search options, Index pane.

    can not search for emails I lost the ability to search my emails. In search options, indexing component, my personal folders object disappeared.

  • Problem with addons with the scanned image file

    The Add-ons under the file menu are grayed out when I open a tiff file that was generated by scanning a negative using an Epson 4 x 5 v800.When I open a normal digital image file, they are very good.With the help of Photoshop CC 2015 1.1 release. One