Adding file name and file full path to a page

Hi all I'm new to scripting
What I want to do and don't know how to go about it is to run a script that collects the saved file name
and the full path where the file is saved on the network and displays it on my document
If any one has done something similar or if some one can help me create it it would be appreciated
Thanks Gabriel

var idoc = app.activeDocument;
var itext = idoc.textFrames.add();
var file = idoc.fullName;
itext.contents = file.fsName;

Similar Messages

  • Saving documents via Scripts: Get current file name and set save path/file type

    I am writing a script that will:
    -Make all layers invisible
    -Make a layer named "background" visible
    -Delete all the invisible layers
    -Save the docment as an EPS file (leaving the original document untouched)
    I am new to scripts and so have based my script by copying code from other scripts.
    Here is my code:
    var doc = app.activeDocument;
    var name = doc.name;
    var hide = function (){ // hide all layers (based on http://forums.adobe.com/thread/644267)
         var L=doc.layers.length;
         for (j=0;j<L;j++){  doc.layers[j].visible=false; }
    hide();
    // loop through all layers
    for (var i = 0; i < doc.layers.length; i++) {
                  // Create the illusrtratorSaveOptions object to set the AI options
        var saveOpts = new IllustratorSaveOptions();
        // Setting IllustratorSaveOptions properties.
        saveOpts.embedLinkedFiles = true;
        saveOpts.fontSubsetThreshold = 0.0
        saveOpts.pdfCompatible = true
    //Set up Variable to access layer name
              var currentLayer = app.activeDocument.layers[i];
    // Loop through the layers and make the back ground layer visible
              if (currentLayer.name == "Background") {
                        docName = name + currentLayer.name+".eps";
                        currentLayer.visible = true;
    // Delete Invisible Layers (based on http://www.cartotalk.com/index.php?showtopic=7491)
    var myDoc=app.activeDocument;
    var layerCount=myDoc.layers.length;
    for (var ii = layerCount - 1; ii >= 0; ii--) {
        var currentLayer = myDoc.layers[ii];
        currentLayer.locked = false;
        var subCount = currentLayer.layers.length;
        for (var ss =subCount -1; ss >= 0; ss--){
            var subLayer = currentLayer.layers[ss];
            subLayer.locked = false;
            if (subLayer.visible == false){
                subLayer.visible = true;
                subLayer.remove();
        if (currentLayer.visible == false){
            currentLayer.visible = true;
            currentLayer.remove();
    // Save Out Document with New Name
    var saveName = new File ( doc.path + "/" + docName );
    doc.saveAs( saveName, saveOpts );
    Everything works fine except:
    1) It saves the document with the name AdobeIllustratorBackground as opposed to the name of the document
    Also, I am not sure how to tell the script to save as EPS and to specify the save location.
    Could some one give me some pointers?          Thanks!

    Thanks! I changed my code to this:
    var title = doc.name;
    var title = title.substring(0, title.length - 3);
    And it now works! (The substring thing removes the .ai extenion).
    However, how do I get it to save it as an EPS? (I found this script that  saves as PNG, but I am not sure how to adapt it to EPS).
    Also, how do I set the file output path?
    Thanks for any help that can be offered.

  • Name and Number selected paths?

    I am working on a very large .ai file of a baseball stadium render. It contains many small sections and box seats that need named and numbered in this format: section::100, section::101, ... and so on. Right now, I'm having to go through and rename each path individually. Is there a script that will save me TONS of time by automating this for me?
    I found this one on here, which is a good start for what I need, but it doesn't let me only number selected paths, nor does it let me start the numbering where I want (say at 100 and go up from there).
    #target illustrator
    var docRef = app.activeDocument;
    var newName = prompt ("What's the base of the new name","base");
    var myNB = docRef.pathItems.length;
    for ( i = 1 ; i < myNB; i++)
    var finalName = newName + i;
    docRef.pathItems[i].name = finalName
    Thanks in advance!!

    I have taken a quick guess at what you want but Im supposed to be busy at work…
    #target illustrator
    var docRef = app.activeDocument;
    var newName = prompt ("What's the base of the new name","base");
    var stNumb = prompt ("What's the start number","1");
    var myNB = docRef.selection.length;
    for (var i = 0 ; i < myNB; i++) {
         var finalName = newName + stNumb;
         if (docRef.selection[i].typename == 'PathItem') {
              docRef.selection[i].name = finalName;
              stNumb++;

  • How do I enter a "log-in name" and "password" in Security Tab options page; some sites block screen-sweeper?

    The data screen-sweeper in Mozilla seems to be blocked by some sites I need to log into, since Mozilla security does not input username and password data. How do I input this info thru Options/Security/Saved Passwords tab for these sites? Thanks!

    If there is a password field on a web page and you have saved a password then Firefox may try to fill that password and enter the name in the field just above that password field.
    You can look at:
    * Saved Password Editor: https://addons.mozilla.org/firefox/addon/60265
    *Form History Control: https://addons.mozilla.org/firefox/addon/12021
    You may want to disable saved form fill to prevent Firefox from filling the name.
    * [[Form autocomplete]]
    * http://kb.mozillazine.org/Deleting_autocomplete_entries

  • I added a plugin and now cannot access Firefox web page

    I have lost access to Firefox webpage and pray for step 1 in how to once again regain access

    To avoid confusion.<br />
    Did you add a plugin (Tools > Add-ons > Plugins) or installed a Firefox extension (Tools > Add-ons > Extensions)?
    *https://support.mozilla.org/kb/Customizing+Firefox+with+add-ons
    In case of the latter, try to start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • One of my bookmarks i cant get into using the user name and password alli get is the page timed out but i can get into the site by using internet explorer

    When I try to get in the site all I get is session is timed out. How can i correct this

    Try to navigate to that page starting with its home page in case you are using a bookmark.
    Clear the cache and remove cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"

  • How do I eliminate firefox from remembering user name and/or passwords on certain web pages that I have PREVIOUSLY checked to REMEMBER usernames, settings, and/or passwords?

    I have selected "remember" when the question was "Do you want Firefox to remember the password for "__________" on ___.com.
    I NO LONGER want firefox to remember the password on some of those sites. HOW DO I CHANGE THIS so that the password IS NOT REMEMBERED?

    Options > Security - click the Saved Passwords button. You should be able to remove anything there that you want.
    By the way, Firefox 3.6 is now up to version3.6.20. It would be a good idea to get 3.6.20.

  • Get only the filename not the full path of the file.

    hi to all..
    how can i get only the filename of the file not the full path and to be placed on a textinput.?
    example:
    when i'browse the file and select sample.txt
    "C:\Users\user\Desktop\folders\sample.txt" this will be inputted on the textinput.
    however, what i want to have is when i'browse and select a file..
    textinput should only contain "sample".
    does anyone knows how to do it?

    Hi cyrus@adobe,
    How are you getting the full path of the file when you browse, I dont think for security reasons the Flash Player will aloow to do so. You can only get the file name not the full path of the file when you browse.
    Are you using Flex4..?? I am not sure whether this is possible in Flex4..However if you are getting full path and if you wanted to show only the filename then you can just use theString class split function to acehive this..
    var fullPath:String = "C:\Users\user\Desktop\folders\sample.txt";
        var splitPath:Array = fullPath.split("\");
        textInput.text = splitPath[splitPath.length-1];
    Thanks,
    Bhasker

  • Get filename and full path from Forms on local directory in MS Windows

    I am writing a Form, when clicking a Push Button, I can click on sub-directory and select a filename, and the filename and the full path are then passed to a Text Item.
    Does any one know how this could be done?

    which version of forms?
    webforms you can use the webutils bean thing.
    client server forms there is/was the hierarchical tree object

  • How can i get the document full path in S_TieDocument?

    I create a new S_TieDocument and override 2 methods:
    extendedPreInsert and extendedPostInsert
    how can i get the document full path in these 2 methods?
    (e.g. if i use the system user to upload a new file named 'test.file' in system root path /home/system, and i want to get the document full path '/home/system/test.file', how to get it?
    anybody know it, pls tell me, thanks a lot.
    java source is as below
    package oracle.ifs.server;
    import oracle.ifs.beans.Document;
    import oracle.ifs.beans.DocumentDefinition;
    import oracle.ifs.beans.LibraryObjectDefinition;
    import oracle.ifs.beans.LibrarySession;
    import oracle.ifs.beans.PublicObject;
    import oracle.ifs.common.AttributeValue;
    import oracle.ifs.common.IfsException;
    import oracle.ord.itech.cmsdk.ws.view.EmbeddedCMSDKWebServicesWSStub;
    public class S_TieDocument extends S_Document
    public S_TieDocument(S_LibrarySession session, S_LibraryObjectData data)
    throws IfsException
    super(session, data);
    public S_TieDocument(S_LibrarySession session, java.lang.Long classID)
    throws IfsException
    super(session, classID);
    // Overrides
    public void extendedPreInsert(OperationState opState,
    S_LibraryObjectDefinition def)
    throws IfsException
    // Always call super
    super.extendedPreInsert(opState, def);
    // Get the LibrarySession
    S_LibrarySession session = getSession();
    def.setUserSetAttribute("CUSTOMATTRIBUTE",
    AttributeValue.newAttributeValue(""));
    //how can i get the document file full path here?
    public void extendedPostInsert(OperationState opState,
    S_LibraryObjectDefinition def)
    throws IfsException
    // Get the LibrarySession
    S_LibrarySession session = getSession();
    //how can i get the document file full path here?
    }

    In the new version of Numbers this option is not available.  You will have to type the file name into the header yourself.  You can post feedback to Apple using the menu item "Numbers > Provide Numbers Feedback"
    or use Numbers2.3 which should be in the folder "/Applications/iWork '09" if you previously had it installed

  • Get-ChildItem directory only (not full path) on error output

    Hello,
    I currently use the snippet below to check for folder permissions, it outputs a CSV file which details Category, Reason and TargetName. When I open my error.csv file I see the 3 columns being populated, but how can I get a 4th column with the directory name
    as well? TargetName outputs the complete path to the folder, I want to also include the directory name in the CSV.
    $Path = "C:\test"
    $errors=@()
    get-childitem -recurse $Path -ea silentlycontinue -ErrorVariable +errors | Out-Null
    $errors | select -expand categoryinfo | select category,reason,targetname | export-csv -NoTypeInformation -Delimiter “,” .\error.csv
    Any help would be appreciated. At this point I dont think getting the directory name only is feasible with my method. I've tried many exampled but cant seem to get it. As easy as it may sound.
    Thank you.

    Hi jrv,
    I plugged in your suggestion as follows:
    $Path = "C:\test"
    $errors=@()
    get-childitem $Path -recurse -ea silentlycontinue -ErrorVariable +errors | Out-Null
    $errors | Select TargetObject
    It works but I'm still receiving the full path to the directory. How can I get only the directory name?
    You cannot use $errors.  It is owned by the system and will give you issues.
    If you want a folder name from a full path just use Split-Path
    I took the + out for a reason. It was not a mistake and I changed the name of the variable for a reason.  The custom error variable will fill with all errors and will be created new each time this is run. Try it without changing it incorrectly until
    you understand what is happening.  Don't just blindly do things because it feels good or because you saw a friend do it.
    $Path = 'C:\test'
    get-childitem  $Path -recurse -ea silentlycontinue -ErrorVariable myerrors| Out-Null
    $myerrors| %{Split-Path $_.TargetObject -leaf }
    PowerShell is very easy If you take the time to learn it. If you just guess you will never learn.  Believe me you could never guess how it works short of a course in software engineering.
    ¯\_(ツ)_/¯

  • Assets windows shows full paths

    The assets window is showing just 2 tabs: size and name and
    name is
    showing full path.
    How do I change that to show names without full paths?
    DW MX 2004

    Win xp
    7.01
    Yes, didn't change a thing
    Yes to all sites, and redefining my site has no effect
    "AndrewDG-MMTS" <[email protected]>
    escribió en el mensaje
    news:eepe85$5sd$[email protected]..
    Hello,
    Dreamweaver's assets panel should only display the filenames
    of your image
    assets.
    - What Operating system are you running?
    - Are you already running version 7.01 of Dreamweaver?
    - Did you try recreating the site cache (Site > Advanced
    > Recreate Site
    Cache)?
    - Does the issue happen to all sites defined in Dreamweaver?
    Have you
    tried
    redefining your site?
    Hope this helps.

  • View or function to return the full path hierarchy of an organization

    Hi,
    The customer is asking to provide a report showing for each assignment of each employees the corresponding organization where it is assigned and the full path of the organization hierarchy.
    The organization hierarchy is at most 6 level deep, so they want to produce the report with the columns:
    root_organization | org_level1 | org_level2 | org_level3 | org_level4 | org_level5 | org_level6 | person_name | assignment_date
    if the person is assigned in an organization lower than the 6th level, the remainin columns should be empty.
    I see that the view HRFG_ORGANIZATION_HIERARCHIES returns only one step in the organizations hierarchy: Parent_organization_name, Child_organization_name.
    Is there any view or function as well which returns the full path of an organization in the hierarchy? At least a function which returns the full path parents of the organization delimited by commas.
    Thank you

    Hi,
    Yes, I wrote a custom code but is running a bit slowly for around 1000 organizations and more than 15 version of hierarcy (so 15000 rows of this view). I wanted to know if there is any optimized code provided by Oracle.
    Thank you.

  • How to suffix user name and password remote pc in shutdown /s command

    Hi,
    We can shutdown a remote pc  using " shutdown /s /m \\ipaddress " command, only if password of remote pc is stored in windows credential  manager.
    But how to  add user name and password when i execute the command for example : when we map a share folder on our pc we use below command with  user name and password
    "net use * \\ipaddress\share password /user:username "
    can we give user name and password of remote pc  while we give shutdown command to turn off  a remote pc (without adding user name and password to windows credentials).
    Thanks in advance..........

    Hello Jayanth kundar,
    Based on my test, I can use the command shutdown /s /m \\10.157.21.77 to shutdown the remote computer when the have the same username and password.
    Do you mean that you want to add user name and password when you want to shutdown the remote computer?
    I can't find a user name and password in Windows Credential Manager, please share us a screenshot.
    Best regards,
    Fangzhou CHEN
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • 100 % free domain name and 2000 mb  linux hosting for one year

    As I said for the first time I didn’t believe I thought
    it was one those internet scams
    But here im having two domain names and one year of web
    hosting 2000 mb 50000 mb
    bandwidth linux hosing . 100% didn’t pay anything just
    ask an American friend to answer few
    savories for me ,When she have a free time , cause the offer
    is limited just for US resident .
    And u know always there are a backdoor just ask any American
    friend ( if u are not ) to answer
    those savories for u And here u are u got a domain name
    registered in ur name for one yeah and
    after that year u will be warned to answer few more savories
    if u wanna keep the domain
    name and the web hosting for another year .
    its easy free and real cause im starting my own online
    business with that web hosting and domain
    name and with the highest quality DNS for the domain name and
    a full feature control panel CP
    as for the web hosting , u can make sure that by ur self
    right now just visit those link register
    and start answering the savories to get ur own web hosting
    and domain name .
    free web hosting and domain name :
    http://www.dietzel.com/partner/idevaffiliate.php?id=393_7
    Free domain name :
    http://www.dietzel.com/partner/idevaffiliate.php?id=393_6
    Free domain name :
    http://www.dietzel.com/partner/idevaffiliate.php?id=393_5
    And this is the website im running right now , using the
    domain name and web hosting I have got for free :
    http://bc-classifieds.net/
    and
    http://valhallarealm.com

    As I said for the first time I didn’t believe I thought
    it was one those internet scams
    But here im having two domain names and one year of web
    hosting 2000 mb 50000 mb
    bandwidth linux hosing . 100% didn’t pay anything just
    ask an American friend to answer few
    savories for me ,When she have a free time , cause the offer
    is limited just for US resident .
    And u know always there are a backdoor just ask any American
    friend ( if u are not ) to answer
    those savories for u And here u are u got a domain name
    registered in ur name for one yeah and
    after that year u will be warned to answer few more savories
    if u wanna keep the domain
    name and the web hosting for another year .
    its easy free and real cause im starting my own online
    business with that web hosting and domain
    name and with the highest quality DNS for the domain name and
    a full feature control panel CP
    as for the web hosting , u can make sure that by ur self
    right now just visit those link register
    and start answering the savories to get ur own web hosting
    and domain name .
    free web hosting and domain name :
    http://www.dietzel.com/partner/idevaffiliate.php?id=393_7
    Free domain name :
    http://www.dietzel.com/partner/idevaffiliate.php?id=393_6
    Free domain name :
    http://www.dietzel.com/partner/idevaffiliate.php?id=393_5
    And this is the website im running right now , using the
    domain name and web hosting I have got for free :
    http://bc-classifieds.net/
    and
    http://valhallarealm.com

Maybe you are looking for