Script can't create new folder on some Macs

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

sak1364

Script can't create new folder on some Macs

Post by sak1364 »

This is a mystery to me that just keeps getting stranger. I have a script that creates a folder in a folder on the Desktop. I have tried it on 5 iMacs (all basically the same) and 1 older MacBook Pro. All users have admin access. All are running Photoshop CS6. Two of the iMacs fail to create the folders but the “.create()” returns “true”. One of the iMacs didn’t work at first but now it does. To make it even more strange, if I write the script to create the folders on a server, it works.

Can anyone explain what’s wrong here? What would prevent it from creating a folder on some computer's internal startup drives and not others?

Here is the simplified part of my script:
Code: Select allvar CurrentDLPFilePath = "~/Desktop";
var DLPFolder = new Folder (CurrentDLPFilePath + "/TestFolder");
var DLPSEPSFolder = new Folder (DLPFolder + "/SEPS/");       
alert(DLPFolder.create())
DLPFolder.create();     
DLPSEPSFolder.create();