Skip to main content
Participant
August 20, 2017
Answered

What is the correct syntax for file path names in layer property expressions?

  • August 20, 2017
  • 2 replies
  • 1870 views

After Effects CC 2017 on Windows 10

I am trying to to a simple variable import from an external text file to populate a text layer with this basic expression in the "Source Text" field:

$.evalFile("\Users\Dave\Desktop\RealEstate\roomnames.txt");

text1

I get a "File not found" error.

If I use forward slashes, I get a "Syntax" Error.

This seems like it should be simple but I have spent hours looking for a solution and can not find anything that works.

    This topic has been closed for replies.
    Correct answer Mike_Abbott

    Try this:

    myPath = "C:/Users/Dave/Desktop/RealEstate/roomnames.txt";

    $.evalFile(myPath)

    Note: the text in your text file needs to be wrapped in quotation marks.

    2 replies

    Mike_Abbott
    Mike_AbbottCorrect answer
    Legend
    August 21, 2017

    Try this:

    myPath = "C:/Users/Dave/Desktop/RealEstate/roomnames.txt";

    $.evalFile(myPath)

    Note: the text in your text file needs to be wrapped in quotation marks.

    ToolfarmJP
    Community Expert
    Community Expert
    August 21, 2017

    Hello,

    Did you try the absolute path?

    C:\Users\Dave\Desktop\RealEstate\roomnames.txt