Get source path of .ai file`?

Hi!
Have searched but i cant find a good way of retrieving the source path of the current .AI file. Is it possible?
IE: If i am working with a file in C:\adobe\Illustrator\beautifulfile.ai i want a function that retrieve C:\adobe\Illustrator\
// Clint

your example C:\adobe\Illustrator\beautifulfile.ai
Well, try this:
alert(app.activeDocument.fullName.parent.fsName);  // = C:\adobe\Illustrator
or (if last backslash is really needed):
alert(app.activeDocument.fullName.parent.fsName + "\u005c");  // = C:\adobe\Illustrator\

Similar Messages

  • F4 Help to get the path for a File source directory

    There are numerous function modules for browsing a particular file in desktop and getting the file path (including the fine name)  , like F4_FILENAME , KD_GET_FILENAME_ON_F4 , WS_FILENAME_GET etc. But can anyone tell me how to fetch only the directory path to the field were the F4 help is given. Actually the filename has to come in some other field in the selection screen. Is there separate funtion modules for these OR will changing parameters in the above function modules work?
    Pls Help....
    Also are there function modules for providing F4 help for getting the path to a file in application directory?

    Try this method CL_GUI_FRONTEND_SERVICES.
    It is a Global CLASS which is having different methods for different purposes
    see the documentation of it and use the methods of it
    see
    CL CL_GUI_FRONTEND_SERVICES
    Short Text
    Frontend Services
    Functionality
    The class CL_GUI_FRONTEND_SERVICES contains static methods for the following areas:
    File functions
    Directory functions
    Registry
    Environment
    Write to / read from clipboard
    Upload / download files
    Execute programs / open documents
    Query functions, such as Windows directory, Windows version, and so on
    Standard dialogs (open, save, directory selection)
    Example
    Determine the temp directory on your PC:
    DATA: TEMP_DIR TYPE STRING.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY
    CHANGING
    TEMP_DIR = TEMP_DIR
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2.
    IF SY-SUBRC 0.
    Error handling
    ENDIF.
    flush to send previous call to frontend
    CALL METHOD CL_GUI_CFW=>FLUSH
    EXCEPTIONS
    CNTL_SYSTEM_ERROR = 1
    CNTL_ERROR = 2
    OTHERS = 3.
    IF SY-SUBRC 0.
    Error handling
    ENDIF.
    WRITE: / 'Temporary directory is:', TEMP_DIR.
    Notes
    The class CL_GUI_FRONTEND_SERVICES is based on the Control Framework. See the documentation for more information, in particular on CL_GUI_CFW=>FLUSH which must be called after many CL_GUI_FRONTEND_SERVICES methods.
    Migration Information
    The old file transfer model was based on function modules of the function group GRAP. The old features have been replaced by the class CL_GUI_FRONTEND_SERVICES. The following list contains the old function modules (italic) and the new methods (bold) that replace them:
    CLPB_EXPORT
    CLIPBOARD_EXPORT
    CLPB_IMPORT
    CLIPBOARD_IMPORT
    DOWNLOAD
    GUI_DOWNLOAD, dialog replaced by FILE_SAVE_DIALOG
    PROFILE_GET
    No replacement, use REGISTRY_* methods instead
    PROFILE_SET
    No replacement, use REGISTRY_* methods instead
    REGISTRY_GET
    REGISTRY_GET_VALUE, REGISTRY_GET_DWORD_VALUE
    REGISTRY_SET
    REGISTRY_SET_VALUE, REGISTRY_SET_DWORD_VALUE
    UPLOAD
    GUI_UPLOAD, dialog replaced by FILE_OPEN_DIALOG
    WS_DDE
    Obsolete: This function is no longer supported.
    SET_DOWNLOAD_AUTHORITY
    Obsolete: This function is no longer supported.
    WS_DOWNLOAD
    GUI_DOWNLOAD
    WS_DOWNLOAD_WAN
    Obsolete: This function is no longer supported.
    WS_EXCEL
    Obsolete: This function is no longer supported.
    WS_EXECUTE
    EXECUTE
    WS_FILENAME_GET
    FILE_SAVE_DIALOG, FILE_OPEN_DIALOG
    WS_FILE_ATTRIB
    FILE_SET_ATTRIBUTES, FILE_GET_ATTRIBUTES
    WS_FILE_COPY
    FILE_COPY
    WS_FILE_DELETE
    FILE_DELETE
    WS_MSG
    Obsolete: This function is no longer supported.
    WS_QUERY
    CD (current directory)
    DIRECTORY_GET_CURRENT
    EN (read/write environment)
    ENVIRONMENT_GET_VARIABLE
    ENVIRONMENT_SET_VARIABLE
    FL (determine file length)
    FILE_GET_SIZE
    FE (check if file exists)
    FILE_EXIST
    DE (check if directory exists)
    DIRECTORY_EXIST
    WS (determine Windows system)
    GET_PLATFORM
    OS (operating system)
    GET_PLATFORM
    WS_UPLDL_PATH
    Obsolete: This function is no longer supported.
    WS_UPLOAD
    GUI_UPLOAD
    WS_VOLUME_GET
    Obsolete: This function is no longer supported.
    Reward points if useful.

  • To Get The Path of A File

    hi
    i wanted to get the path of the file.i just need to get the path not the file.i wanted to do using swing.may be filechooser or tree. but i need to know how could i get tht if i know the exampl for this it would be useful for me ..

    i need it in a way that like in windows explore.. so tht if i get the path of it i can use that in another class file.
    anyway i am looking out in File class also.

  • How 2 get the path of a file

    how 2 get the path of a file Using jsp
    i have tried getPath...but i'm geting the error
    The method getPath(String) is undefined for the type HttpServletRequest
    any idea how 2 get the path of a file

    You need ServletContext#getRealPath().
    API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)

  • How 2 get the path of a file Using jsp

    how 2 get the path of a file Using jsp
    i have tried getPath...but i'm geting the error
    The method getPath(String) is undefined for the type HttpServletRequest
    any idea how 2 get the path of a file

    You need ServletContext#getRealPath().
    API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)

  • How do i get the path of the file selected for opening in JFileChooser

    hi
    I need to get the path of the file selected for opening or saving in the JFileChooser dialog box.Is there any method available.if not how do i get that?
    Thanks and Regards
    Saminathan.

    don't know if its the best/only way, but you could use the getSelectedFile() method in JFileChooser which returns a file and then use the getAbsolutePath() file method

  • Getting absolute path of a file running in remote machine

    Hi,
    I want to get the absolute path of a file that will be created in the remote server. Inside a directory XYZ in remote machine, the file will be created and the remote machine's address is xxx.xx.x.x. I have used the following snippet
    File f=new File(Filename);
    f.getAbsolutePath();
    Now, in the output am getting the absolute path of the file as d:/XYZ/Filename. Is there any way to get the output as xxx.xx.x.x/XYZ/FileName ? Can someone please suggest why the server details are not fetched and instead the directory name is fetched.
    I am running the program to get absolute path of a file in my remote machine. and for accessing that remote file from my machine, I use xxx.xx.x.x/XYZ/FileName.
    Thanks in advance.

    I'm going to take it a step further and guess at what the OP is going to say next.
    On host w.x.y.z there's a file /a/b/share/some_dir/file.txt.
    Host w.x.y.z is sharing the /a/b/share/ directory as SHARE.
    Client mounts \\w.x.y.z\SHARE as D:, so that he sees D:/some_dir/file.txt.
    OP now wants to know not just that D:/some_dir/file.txt is \\w.x.y.z\SHARE/some_dir/file.txt, but also wants to know that on w.x.y.z, SHARE corresponds to /a/b/share.
    @OP: If that's what you want, forget it. Part of the premise of file common drive/directory sharing protocols is that the client does not know or care and does not need to know or care what the absolute path is on the serving host. It's none of his business.

  • How to get source of remote html file.

    i want to read the remote html file source
    i don't have any physical / original path of the file
    i have only the url path
    example url : http://mydomain.com/myhomepage.html
    using this url can i get the source of the file myhomepage.html
    thanx
    senthil.

    U can use java.io.*, java.net.* API
    here goes a sample code
    import java.io.*;
    import java.net.*;
    public class URLconnecting{
         public static void main(String[] args)throws Exception{
              URL url = new URL("http://www.yahoo.com");
              URLConnection conn = url.openConnection();
              BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
              String line;
              while( (line= reader.readLine()) != null) System.out.println(line);
              reader.close();

  • Get absolut path of a file

    when I write to a file in the actuel directory,
    e.g fw = new FileWriter("file.txt");
    how I can get the absolute path of this file? (e.g. C:\dir\file.txt)
    thanks stn

    Captain Obvious says ..... File.getAbsolutePath();
    Thank you, Captain Obvious.

  • Getting absolute path of a file in a webapp without using servlet/JSP

    Hi all,
    I need a small clarification. Is it possible to reterive the absolute path of a file present in a tomcat web application without using Servlet/JSP. I have a normal java class which uses this file to read the configuration parameters. I like to know whether I need to create a seperate servlet which will read the parameters from web.xml.

    Hi all,
    I need a small clarification. Is it possible to
    reterive the absolute path of a file present in a
    tomcat web application without using Servlet/JSP. What if the file is in a WAR? What do you do then?
    I
    have a normal java class which uses this file to
    read the configuration parameters. There are other, better ways to do this.
    I like to know
    whether I need to create a seperate servlet which
    will read the parameters from web.xml.What do you really want it for? You shouldn't need an absolute path. Use the class loader to get an InputStream.
    %

  • How to get full path of a file uploaded using file control on a jsp ?

    Hi all...
    I have a jsp on which i am using a file element (input type="file") to upload files present on the physical file system.. Thats working fine.. But i want to retrieve the full path of the file uploaded for further computation.
    What are the possible ways which can give me the full path ?? (e.g. "D:\data\text\Output.txt" )
    Thanks all for attending the question..
    Regards
    Prasad

    Some browsers send the full path. Some do not.
    You can not affect this in any way shape or form.
    All you can count on receiving is a filename - no path information.
    So you will have to have some other way for the user to pass along this information.
    If they are uploading to a "remote web site" they could specify a folder to put the uploaded file in.
    You could classify it and put all image files in "images" and all script files in "scripts" etc etc by default, and let the user deal with it in their own HTML.
    Hope this helps,
    evnafets

  • Source path Flex config files not updated in generated output

    I have a project, built using Flash Builder 4.0 on Mac OS X 10.6.
    One of my source directories is src/main/webapp which contains a WEB-INF directory with this structure:
    webapp
              - WEB-INF (applicationContext.xml etc)
                        - - classes
                        - - flex (services-config.xml, remoting-config.xml, proxy-config.xml, messaging-config.xml)
                        - - lib
    In properties, under Flex Build Path I have set src/main/webapp as an additional source folder.
    When the project compiles, all the artifacts are created, and all of the above, including *.xml files under
    WEB-INF are copied to the output folder, except for the WEB-INF flex directory which has the four xml
    configuration files.
    The same happens when I create a bin-release folder using the Project/Export Release Build menu.
    Any ideas why just the WEB-INF/flex directory is not being copied to bin-debug or bin-release?
    Thanks.

    I don't know a whole lot about beehive pageflow and I haven't done this myself, but I do believe you have run apt to have it generate the various other files pageflow and controls needs. I found some information in the pageflow docs:
    http://beehive.apache.org/docs/1.0.2/netui/projects.html#building
    http://beehive.apache.org/docs/1.0.2/infra/beehive-ant-macros.html
    Greg

  • WMIC get Executable path in batch file

    Hi,
    I would like to get a execution path of a process using batch file. I wrote,
    FOR /F "usebackq skip=1 tokens=* delims==" %%f IN (`wmic process where "ProcessID=8000" get ExecutablePath`) DO echo %%f
    This command gives the execution path. But i cant set the value in a variable. Set command also fails here. 
    Please anyone help me.

    Hi,
    I would like to get a execution path of a process using batch file. I wrote,
    FOR /F "usebackq skip=1 tokens=* delims==" %%f IN (`wmic process where "ProcessID=8000" get ExecutablePath`) DO echo %%f
    This command gives the execution path. But i cant set the value in a variable. Set command also fails here. 
    Please anyone help me.
    Here you go:
    @echo off
    FOR /F "delims==" %%f IN ('wmic process where "ProcessID=3940" get ExecutablePath ^| find "\"') do set Exe=%%f
    echo %Exe%

  • Getting directory path of a file

    Is there an easy way to get a directory path to a selected file? I am having problems at work where I need to tell someone where a file is but it is nested deep in a directory structure. I'd love to be able to navigate to the file and somehow be able to copy the path. Any ideas? This can be easily done in the Windows (yuck!!!) Explorer.

    A third option is to do a spotlight search for the file, then hover your mouse over it and you will get a yellow tool tip with the file path. However, as in W.J. Lope's first option you cannot copy and paste. Or you may want to take a look at an application like PathFinder.
    -mj
    [email protected]

  • FileReference / Getting Absolute Path of Upload File

    Hi all,
    I am relatively new to Flex and I am using Flex SDK 3.4.
    I am trying to upload a file to my DB using FileReference.
    However, I am unable to get the absolute path of my chosen file, to be displayed in my textbox.
    Requesting your help on this issue.
    Regards,
    Arvind Raj

    I use the following to find the directory src in the WEB-INF/classes directory        final URL root = getClass().getResource("/src");
            final File rootFile = new File(root.getFile());

Maybe you are looking for