Copy link to clipboard
Copied
Hi guys
,
I tried to check if file with path is Folder item,
its return me true also if it is not folder item,
what I did wrong?
(I am working on PC)
var MyFolder=new Folder("~/Desktop/test.png");
if(MyFolder.exists){//Return "True" only if it is folder.
alert("true");
}else{
alert("false");
}
var MyFolder = File("~/Desktop/test.png");
if(MyFolder instanceof File){ // check here
alert("true");
}else{
alert("false");
}
Copy link to clipboard
Copied
var MyFolder = File("~/Desktop/test.png");
if(MyFolder instanceof File){ // check here
alert("true");
}else{
alert("false");
}
Copy link to clipboard
Copied
Tnx a lot ![]()
![]()
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more