Having trouble with the File and Folder Objects (PSCS3 javascript on Win)

I'm having trouble successfully creating a new folder on my windows platform, using javascripts in photoshop. In ExtendScript Toolkit 2, set to Adobe Photoshop CS3, I've tried:
var myFolder = new Folder("/c/Documents and Settings/vcastelo/My Documents");
myFolder.create();
and
var myFolder = new Folder("/c/Documents and Settings/vcastelo/My Documents");
is this right? what am I doing wrong? It's pretty basic stuff, I know but I can't figure is out... any help would be greatly appreciated.

[email protected] wrote:
> oh I see, I just figured it out... the drive designation isn't case sensitive... but i didn't add the name of new folder to the destination path.
Yep.
>
> var myFolder = new Folder("c:/Documents and Settings/vcastelo/My Documents/data");
> myFolder.create();
The "/c/Documents and Settings/vcastelo/My Documents/data" form works, too, and
should be preferred.
Here's an extreme example as to why this is a good idea:
I work in an XP/cygwin environment, so I added links to all of my drives in my
root cygwin folder. As a result, the path /p/Pictures/2008-05-05 is the same on
the bash command line (and other tools) as it is in PSJS. I carried this over to
my Mac, as well. I mount P: drive in OSX then setup links so that
/p/Pictures/2008-05-05 is also the same on the Mac. This has vastly simplified
my work. The only time I use system-specific pathnames is in a script's UI.
-X
for photoshop scripting solutions of all sorts
contact: [email protected]

Similar Messages

Maybe you are looking for

  • Can see Windows PCs from Mac, but can't see (and access) Mac from PCs

    Yesterday, I ran into a strange problem which I'm not able to figure out. I share an office with some engineers, who have their computer environment (server, network), all running Windows (XP and Vista on the PCs, Windows 2003 for the server). Within

  • Macbook Pro vs Macbook Pro with retina display

    Hi, I'm getting a new laptop in december and I'm trying to figure out wich one I should buy. Here are my two options: Macbook Pro (non retina) 2.3GHz Quad-core Intel Core i7, Turbo Boost up to 3.3GHz 8GB 1600MHz DDR3 SDRAM - 2x4GB 500GB Serial ATA Dr

  • MouseClick event on a JLabel inside a TableCell

    I'm building a table and each row contains 5 cells: 3 uneditable text labels edit icon del icon I want to open a dialog to edit the whole row when I click on the edit icon and delete the row when I click on the del icon. But the problem is that when

  • Change from display attribute to compounding attribute

    Hi, I have 3 info objects as display attributes of another infoobject. I want to change them to be compunding attribute instead of display attribute but I'm not able to delete them from the attributes list. Please let me know how can that be done. Th

  • Garbled Graphics every once and a while on FF 4.0

    I have been using FF 4.0 for a few days now. Every once and a while while browsing, all of a sudden the graphics will freeze up and then all of the menus on FF are garble graphics (see screenshot link below). This only seems to happen when Pandora ra