How to ask to overwrite existing file?
Hi, currently I have a script I found that allows me to export with custom names etc. The script also checks if the file with same name already exists, and if it does, then it pops up an alert "file name already exists" Then it stops exporting.
I want to be able to continue to export and overwrite/replace the existing files.
I can't seem to figure out the Conditional statements with if, else, else if etc
This is the current code, any help would be great thanks!
// Check if PDF-file allready exists
if (myFile.exists == false){
// Export the file
myDoc.exportFile(ExportFormat.pdfType, myFile, false, myPreset);
}else{
alert("PDF-file allready exists !");
}
}
