Using a relative path in .txt in expressions

Hello

I use AE Expressions script to read in text from an external .txt file. The script works very well, except for the fact that I need the path to the file external .txt to be relative to the project folder After Effects instead of the absolute. The path cannot be absolute, since I use this project "blindly" on different computers with files different works of art/configurations. This is the script I use:

myPath = "absolute_path/vars/vars.txt";

Try

{

$.evalFile (myPath);

eval (thisLayer.Name);

}

catch (err) {""}

I tried to put in a relative path in the variable for example myPath "myPath =". " "/ vars/vars.txt. Unfortunately, this does not work. I wonder if using a relative path in the AE Expressions is at all possible and if not, what would be another solution to this problem? (There may be a few plugins out there that could solve this problem?) Any advice or assistance would be greatly appreciated I'm in kind of a pinch of understand this one.

Greetings,

Talmon, I am under CC 2014 and I got it works:

try {}

myPath = "... / Graphics/ePriceData.txt.

$.evalFile (myPath);

eval (thisComp.Name) [index + 1];

} catch (err) {}

Err;

}

I wanted to refer to the txt file using a pathname relative, and she and the AE project file are in the same folder (Grafiche). Using the above string it seems to work. It kind of defeated the purpose, but it's maybe half a step towards a permanent solution!

Tags: After Effects

Similar Questions

  • How to read the .txt adfLib pot file to the model layer by using the relative path

    Hello

    In my application, I use the ExtendedDynamicFldTbl (extends weblogic.wtc.jatmi.DynamicFldTbl), which the manufacturer requires the field file path table as a parameter.

    In the API, it is said that this name of path can be an absolute path, a relative path to the directory where Java has started, or a relative path that can be found as a resource on the classpath.

    I have created this ExtendedDynamicFldTbl to the model layer project, placed the fild_tbl.txt in a separate package and pass the path relative to the DynamicFldTbl constructor.

    Given my code below to get the instance of ExtendedDynamicFldTbl
    package model.tuxedo;
    
    public class ExtendedFldTbl  extends DynamicFldTbl
    {
    
        private static ExtendedFldTbl extendedFldTblinstance = null;
        
        public ExtendedFldTbl(String tablePath, boolean flag)
        {
            super(tablePath, flag);
        }
        
        public static ExtendedFldTbl getInstance()
        {
            if (extendedFldTblInstance == null)
            {
                URL url = extendedFldTblInstance.class.getResource("resource/fldtbl.txt");
                if (url == null)
                {
                    throw new RuntimeException("Tuxedo Service : fldtbl.txt is not found in the path 'model.tuxedo.resource' ");
                }
                extendedFldTblInstance = new ExtendedFldTbl (url.getPath(), true);
                String[] list = extendedFldTblInstance .getFldNames();
                System.err.println("fldtbl loaded. Total FML entries loaded = " + list.length);
            }
            return extendedFldTblInstance ;
        }
    }
    I just added the output of the build of the layer model to view the project of the layer and tested. It works fine and I am able to get the ExtendedFldTbl instance with all loaded fields. But rather than add dependencies, if I create an adfLibJar for the layer model project and you add to view the project of the layer, it does not work. It is not ablt to read the file of adf lib jar file.

    Issues related to the:

    1. How can I solve this?
    2. Although I have kept the field text file table in the source of the project itself, when I read the url, it is
    "C:/Documents and Settings/raguramanv/Application Data/JDeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/tmp/_WL_user/SampleWtc/3gkmt9/war/WEB-INF/lib/SampleWtc_Model_adflibSampleWtc1.jar!/model/tuxedo/resource/fldtbl.txt"
    Instead of the physical directory, how can I use application in model layer context?


    Thanks in advance

    Rambeau

    Hello

    Try /adf/ or /afr/ in the URL. Then includes the ADF resource loader which is used to get the contents of a lib of the ADF. Take a look at the structure of ADF library where the file is located in. It should be in a directory with /adf in the folder structure

    Frank

  • Is CFFILE read uses only the absolute path or the relative path too?

    I use cffile read access to my file to json. I would like to know if the cffile uses only absolute or relative path too? If I tried to use the relative path, it kept send me errors on non-existent file.

    Read what I posted on the documentation. CFFILE read must be an absolute path. If you use a path relative to its parent to the CF temp folder:

    If not an absolute path (starting with a drive letter and a colon or a slash to advance or back), it is relative to the ColdFusion temporary directory, which is returned by the GetTempDirectory function.

    There is no relative path from your web files. IF you just put a relative path, it will attempt in the CWS for the file temp folder.

  • URL relative Paths - to use or not use

    That is the question! :-) (OK, not much of a joke of Hamlet, but I tried.)

    Greetings,

    I have an APEX application that uses interactive images with hotspots. Hot spots have 'hard-coded' URL in them. This causes some minor problems during the transition from Dev to Test prod. Not a big problem, but maybe they can be eliminated with a relative path of the URL. Which raises a few questions -

    1 - use relative URL paths in the hot spots? Are my main concern - there security issues if I do not use the full path, with domain name, etc.

    2. If using a relative path of the URL is the way to go - how the domain, part etc. of the URL can I omit and still have the URL work?

    3 - depends on the answer to #2 what is the HTTP server and how it is configured?

    Thanks in advance, Tony

    hidden wrote:
    In response to your question "how to parent?

    It is an example of one of the URL mentioned earlier...
    http://Fandango.Mgmt.com:7000/apex/f? p = 2031:10:681666703179901:NO:P10_HEADER_ID, P10_CELL_TITLE:8900, 11-4

    How much of it can be omitted?

    Tony,
    When you are within your APEX applications, all you need is the f? p = forward.
    This is because all pages are running from the location f (seen from the point of view of browser). So, if you go to another page of the apex of your URL may start from the f to the front.
    If you wanted to you image would be, in general, go back to the root of the server with /i/image_name.jpg like

    Thank you
    Jorge

  • UDL connection with relative path database file

    Hi all

    I use the shipper of the property to retrieve the test of the database settings. I Specifies the database to read by using a .udl file.

    When opening a connection to database (using the step of database type) open I'm able to specify the location of the .udl file as follows:

    "FILE NAME=C:\\Development\\IW_EST_2\\TesterSoftware\\TS\\Database\\DatabaseConnection.udl;"

    It works fine for now. However, I'm developing on the computer that will be deployed on the sequence. It is for this reason that I would use a relative path.

    Is it possible to do? If so, how?

    Thank you very much

    Cam.

    You can use a UNC naming convention to specify the location of the UDL.

    A UNC name will replace a drive letter with a machine name and the share name.

    Example of a connection string, I use every day:

    "FILE NAME=\\\netapp1\\shared\\STE\\SPOTS.udl".

    (note that the quadruple backslashes before the name of machine)

  • How to open a configuration file with a relative path?

    I want to open a configuration file when my application is initialized (first 'State', you can tell) and I use 'Open file.vi Config' and tried to pass the path of the config as 'data\myconfig.ini' and the 'File exists?' vi gave no error (simply, the exit is 'false') but the config Open leader gave an error.

    If I spend an absolute path "D:\xyz\xyz\myconfig.ini", it works fine. Is not is it possible to use the "relative path" I recall using it before searching for other tasks?

    I'd rather have this file in the folder "data" my application setup will create the destination directory during the installation of the application, because it won't be easy when I want to ask the user to open and modify. Or, I just put it in "C:\". "that exists on all windows computers, but it would be too open.

    Thanks in advance!

    hope this helps:

  • Relative path does not work in Captivate 9

    Hello


    I use the relative path (docs/document.pdf) to open documents of reference such as the PDF files in a new window in my captivate projects and they always worked until I upgraded to 9 Captivate. The path doesn't work anymore and opens a web browser window by default instead. Not sure if I'm missing something. The "docs" folder to call the PDF document found in the published folders (see image below). I appreciate all the advice.

    relative path structure.png

    Well, it's been 4 days and I did not receive a response. I contacted support and they gave me the following instructions, in the case if you are interested:

    In order to link the document, select the action "Open url or file" and in the path, just put the name of the document [0.pdf]. Make sure that the document is in the published folder. So the lesson learned, keep documents directly in the published folder, all the subfolders [docs/document.pdf].

  • Open the other project - relative path

    I hate to keep asking this question... but someone came up with a viable solution for the opening of another project in Captivate 4 using a relative path? I see this discussion start and stop at various locations... but it never seems to be an answer that works. I don't quite understand why Adobe has taken this feature of this version... like he did the almost useless product for me. I need to be able to relate a project to another somehow, and I don't know the absolute path is going to be when I create the training.

    I don't know where else to turn for help on this. Anyone?

    Thank you.

    Margin

    Hello

    There are many factors at play here.

    Are you sure that Flash security is not hinder you?

    Click here for help with security setting

    See you soon... Rick

  • Link to files via the relative path?

    It seems that Captivate is only able to connect to external files via absolute links. In other words, when I create a click box that opens a file and select a file that is located on my development machine, the project will always look this file on my hard drive, even once it is posted on the Web. It's extremely frustrating, and I have not found a work around.

    Please help me identify a way to bind using a relative path. In other words, the project will solve it is the current residence and search for content in the directory, it lies in or specified directories under this location. It is the only way that you can create a project that can run successfully during the validation. Captivate already done this, when you create a click box that opens another project, so there MUST be a way to do when opening project files!

    Help, please!

    Thank you
    Dan Roberts

    You, Mr President, is a scholar and a gentleman!

    According to the agreements that you have described, I was able to create workable links. This should be widely published, I'm sure that many other authors is on the same problem.

    Note to Adobe: the ability to create relative links should be inside the product option, as in most of the other products I've used.

  • How do you use relative paths in ColdFusion?

    I'm having a problem that I can not wrap my head around. I have 4 sites all reside under C:\ColdFusion9\wwwroot\websites\. Unfortunately, when I use relative paths, he always navigates to wwwroot instead of from this record Web sites. I want to make sure I can use relative paths which are always calculated in the folder root of Web sites instead of the ColdFusion wwwroot folder.

    I had a temporary difficulty just to create a mapping in the CF Administartor. Although, this became a problem because I had to change it whenever I worked on another Web site. In addition, it would work properly if I used a relative as path (/ documents). Instead, it only works if I did a relative as path (. / documents).

    Can someone help me solve this problem? I spent so much time to try things it's not even funny.

    I'm using the CF9 Developer Edition with Dreamweaver CS4.

    CF built-in web server only supports a virtual server for each instance of CF, so you should change it whenever you want to work on a separate site, or create a separate instance of CF using the Instance Manager in CF administrator You won't have a Instance Manager available, given that you have chosen the 'standalone' CF during installation version. If you have reinstalled CF to use the JRun multiserver option, you can install multiple instances of CF and each would have a port separated (8300, 8301, etc.). However, consuming also considerably more resources on your computer.

    The best solution for this is usually to install an external web server, IIS or Apache and use it with your single instance see IIS is a component of Windows, so the version of IIS, you can use is limited by the version of Windows you are using. If you do not have Windows XP, you will be able to use IIS to run several virtual servers. Apache won't work regardless of your OS, but can be a little more difficult to set up.

    Dave Watts, CTO, Fig Leaf Software

  • Using relative path to file/ftp adapter

    Hi all

    How to have a relative path for the file / ftp adapter operation in/out?

    Example: Consider $ORA_HOME = / home/oracle-> this environment variable can be different on different machines
    I want to drop a file in $ORA_HOME/Folder1/Folder2 (or query to a file).

    < partnerLinkBinding name = "FTP" >
    < property name = "wsdlLocation" > FTP.wsdl < / property >
    < property name = 'out_dir' type = "LogicalDirectory" >what I write here? < / property >
    < property name = "retryInterval" > 60 < / property >
    < / partnerLinkBinding >


    If I can't configure this in the section "links" partner or agent link activation, otherwise, how to achieve this?
    I use version 10.1.3. *.


    Thanks in advance.
    Roshan.

    You can achieve by using the deployment scripts if the directory evolves based on the environment
    If you want to change running you can use the properties of jca to set using the variables during execution.

    Kind regards
    Ajay

  • How to keep a relative path in a global variable

    Hello

    I use Teststand 2013 and 2013 of Labview

    Is it possible to set a relative path to a global variable in the Teststand? E.g. "... \vector1." HWS.

    Or should I use Labview functions to solve this problem?

    .

    Thank you

    The railways are much easier to handle in LabVIEW.  Thus, you can store the relative path as a string and then use LabVIEW to make the absolute path.

    I usually store a file into a global variable and then I can just concatinate the strings to build the absolute path.  For example:

    FileGlobals.Folder = "C:\\foo\\bar\\"
    Locals.Path = FileGlobals.Folder + "blah.txt".

  • Urgent: how to create a shortcut with a relative path?

    I put a set of files and folders nested on a server on a network location.  (Use of office machines Vista; I don't know that the server is running.  The files are a text file and two Office 2007 files).  Users will copy this set-up files on their computer (there is a program of VBA macro in a Word document, they need).  They need tomorrow (Friday) and the shortcut path gives me fits!

    The hierarchy looks like:

    MainDir
    File.txt
    SubDir1
    Shortcut to the Word file
    SubDir2
    Word file
    Excel file

    I don't think even the paths associated with the shortcut until I looked a little deeper.  Because I put all the files and folders together on my computer, when I did a drag - move in the folder on the server, the target properties and start in the shortcut always pointed at my computer!  So now, I'm afraid that a user copy this on their machine will have a shortcut that points to ~ my ~ computer, instead of the file on their computer.

    I deleted the shortcut located on the server and creates a new one from the Word file in the directory on the server.  Better - I think - but it still points to the location of the server.  And it is even more likely that, when the user opens the shortcut, it will try to open the file on the server, vice the file on their computer.

    How can I create a shortcut to this Word file that will pick up the relative path from around where to reside?  I can just click > properties and change the target and start in paths?  Or do I need a VBScript or VBA?

    I have to get this done fast!  A kick - in the right direction is greatly appreciated.

    Ed

    Hi Ed,

    It is not possible to create a shortcut with a relative path.

    You can try the following allows to bypass and check if it helps:

    Create a shortcut to cmd.exe running the start command to open the current directory. Then set the MDC in the

    The shortcut properties.

    a. make a new shortcut to: cmd.exe /c start.

    b. now right-click on it and get the properties of the shortcut (shortcut tab).

    c. the shortened full path must have been set to this:

    %windir%\system32\CMD.exe /c start.

    d. set the directory of "start in" (i.e. DLG) to be a relative path:

    (Example for a shortcut on the desktop)

    ...\SendTo

    e. click on "change icon...". "and set" look for icons in this file: "to: %SystemRoot%\system32\SHELL32.dll and press ENTER.

    Standard folder icon will probably be in the lower right.

    f. now you can copy this file and simply change the "start in:" to make new related shortcuts directory.

    NOTE: The above steps are just an example, so try this at your own risk. And check if it works.

    You can also read the following article and check:

    Folder redirection fails when you specify the mapped network drive or the Environment Variable

    http://support.Microsoft.com/kb/321805

    You can check out the following link and also post your request in the Technet forum for further assistance:

    http://social.technet.Microsoft.com/forums/en-us/winserverPN/threads

    Hope this information is useful.

  • 765 and for Thinkpad 760XD BIOS updates are missing in driver matrix and 'use the fast path.

    BIOS update for ThinkPad 760XD and 765 all are not in the download area of Lenovo - the matrix driver , or using the fast path.

    I have found the BIOS 2.13 HXET60WW 09/12/99 hidden in the Lenovo area download by trial and error:

    The README file:

    http://download.Lenovo.com/ibmdl/pub/PC/pccbbs/mobiles/spsdhx60.txt

    The update of the BIOS can be found here:

    Download.Lenovo.com/ibmdl/pub/PC/pccbbs/mobiles/spsdhx60.exe

    These are versions of BIOS:

    1.00 HXET23WW 11/01/96 file not available
    1.01 HXET27WW 11/12/96 file not available
    1.02 HXET31WW 18/02/97 file not available
    2.00 HXET51WW 15/08/97 file not available
    2.01 HXET53WW 25/09/97 sytph201 README: "an error occurred during the processing of your request."
    2.10 HXET57WW 21/05/98 sytph210 README: "an error occurred during the processing of your request."
    2.11 HXET58WW 30/03/99 spsdhx58 README: "an error occurred during the processing of your request."
    2.12 HXET59WW 07/09/99 spsdhx59 README: "an error occurred during the processing of your request."
    2.13 HXET60WW 12/09/99 version README

    I submitted a request by e-mail to ask for inclusion in driver matrices.

  • How can I specify relative path to file Subvi to screw?

    I use LabVIEW 2009 Service Pack 1.

    SubVIs are referenced by absolute paths, so when I move to a new folder I may need to adjust their paths again.

    How can I make a Subvi make reference to a relative path that I do not have set his path after you move the screw in a new folder or a new player?

    I think that the SubVIs are referenced internally by relative paths. Once you move the whole project in a new place, he should find everything in the new relative paths.

    Where have you encountered problems?

Maybe you are looking for

  • How to remove the Firefox orange button at the top left of the screen

    How remove Firefox orange button at the top left of the screen, it is a serious obstacle to my impulsive reflex hit "File" at the top left of the screen. Is throwing me off the coast of the big time, but also another source of frustration {absent the

  • ThinkPad S3 Yoga 14 wake up from his sleep at random

    Seem to have supply problems since the last days of three/four - guard computer wake from sleep at random, without mouse input or anything to tell him to do. Don't stop running, awake, after that, even if the lid is closed. Massive waste of battery.

  • Log stopped working for FSX Flightsim

    We have the Flightsim X Gold Deluxe and the logbook worked without problem.  Then it stopped working for no apparent reason.  Tried to remove some of the oldest newspapers to give more space, but that has not worked. Someone can let me know what happ

  • Ctrl key doesn't work does not correctly

    Hello I have a HP Pavilion 17-e031sa laptop bought only 2 weeks ago running Windows 8.  The CTRL key does not work as it should.  In general, I would like to use it with the left button of the mouse to select non-consecutive items for the copy, but t

  • Service of blackBerry Smartphones concerns tarnish Blackberry

    Hello I'm a university student who has had my BlackBerry Bold 9780 for these last two years and have nothing but LOVED. I depend on my device smartphone for a number of functions throughout my life of all school days and have been nothing but satisfi