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

Issue with file exists stat API

Participant ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

Hi All,

 

File status API provided in the javascript level window.cep.fs.stat and extendscript level 

file.exists is not worked as expected.

Javascript

For a valid file path in the system source

var result = window.cep.fs.stat(source);
result.err will be non zero which indicates file is not present in the system.
Extendscript
var neFile= new File(path); 
neFile.exists will be false even when path is a valid path
 
Problem exists in both windows and mac.
Is this a known issue?  Is there any work around for this?
Please advice.
 
Thanks
TOPICS
Editing , Error or problem , Performance , SDK

Views

255

Translate

Translate

Report

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

Adobe Employee , Nov 25, 2020 Nov 25, 2020

This works fine, too.

 

var myFile = new File('/Users/bbb/Movies/aaa aaa.mxf');

if (myFile){
	var exists = myFile.exists;
}

 

Perhaps encodeURI/decodeURI could solve the issue, of special characters (like %20 for space)?

Votes

Translate

Translate
Adobe Employee ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

ExtendScript File.exists is working correctly for me, on two different systems. In what version of PPro are you testing it?

Votes

Translate

Translate

Report

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
Participant ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

Hi Bruce,

 

Premiere pro version 14.6.0 (Build 51)

We came across this issue when file name contains special characters like Test%20Test

 

Thank you

Votes

Translate

Translate

Report

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
Adobe Employee ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

LATEST

This works fine, too.

 

var myFile = new File('/Users/bbb/Movies/aaa aaa.mxf');

if (myFile){
	var exists = myFile.exists;
}

 

Perhaps encodeURI/decodeURI could solve the issue, of special characters (like %20 for space)?

Votes

Translate

Translate

Report

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