copy file to folder in applescript inside javascript
Hi All,
I used the below code to copy file in folder specifically not to change the creation date.
So I used applescript inside javascript. But it throws the error
var myFolder = Folder.selectDialog("Choose the Folder");
var myFile = File.openDialog("Choose the File");
var myAppleScript = 'tell application "Finder"\r';
myAppleScript += 'copy file '+ myFile+ ' to folder ' + myFolder +'\r';
myAppleScript += 'end tell\r';
app.doScript(myAppleScript, ScriptLanguage.applescriptLanguage);

Please correct me....
Thanks
Mahesh