Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Create a system level .txt file

Community Beginner ,
Aug 03, 2020 Aug 03, 2020

Hi,
I want to create a text file via after effects on a mac. I am using the code below but I don't know what is going wrong as I am unable to create the folder. I have enabled Write and network access inside after effects. Please help.

 

var scriptFolderPath = File($.fileName).path; //alert(scriptFolderPath)
var s = File(scriptFolderPath + "/testfile.txt");

TOPICS
How to , Import and export , Scripting
453
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 04, 2020 Aug 04, 2020

Has your user permission to write to that folder?

How to you try to create the file?

 

The statement

var s = File(scriptFolderPath + "/testfile.txt");

does not create a file yet, it will only be created once you try to write something to it:

s.open("w");

s.write("some contents for the file");

Translate
Community Expert ,
Aug 04, 2020 Aug 04, 2020

Has your user permission to write to that folder?

How to you try to create the file?

 

The statement

var s = File(scriptFolderPath + "/testfile.txt");

does not create a file yet, it will only be created once you try to write something to it:

s.open("w");

s.write("some contents for the file");

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 11, 2020 Aug 11, 2020
LATEST

Yes, thanks for the input. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines