6 Replies Latest reply on Mar 8, 2011 7:23 PM by saitansky

    could not complete the action, since the destination folder does not exist

    ben_northern

      Trying to run "ExportFlexSkins.jsx". Seems to run as expected - I choose a destination folder, then the batch begins. Seems like as PS is trying to save each individual asset I get the "could not complete the action, since the destination folder does not exist" error. For EVERY Asset in the PSD. This is fresh install of CS5 - with recent downloaded PS Flex skinning files. Although I don't think they've been updated since 2007. This is a productivity killer for me - anyone else have this issue?

       

      FYI The Flex skinning templates can be dl here: http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex_skins. My problem is the Photoshop script "ExportFlexSkins.jsx"

       

      Message was edited by: ben_northern

        • 1. Re: could not complete the action, since the destination folder does not exist
          riafan

          Having the exact same problem, did you find a patch?

          • 2. Re: could not complete the action, since the destination folder does not exist
            Michael L Hale Level 5

            I had a look at the script ExportFlexSkins.jsx and I think the problem may be with OS permissions. The script creates a folder named 'assets' in the selected folder. However it doesn't check to see if the folder was actually created, just assumes it was. Depending on the OS and folder selected the script may not be able to create the subfolder.

             

            At least that is my guess as the script works fine for me on WinXP.

             

            You could add a check to make sure the subfolder was created near the top of exportChildren()

                 var tempFolder;
                 tempFolder = new Folder (folder + "/assets/");
                 if(! tempFolder.create() ){
                    alert( 'Unable to create assets subfolder in '+decodeURI ( folder ) );
                    return;// don't try to export
                }
            
            • 3. Re: could not complete the action, since the destination folder does not exist
              JJMack Most Valuable Participant

              What Michael wrote struck some of my scripts when I installed my script on a new machine that had Windows 7 on it.  I had copies some code from someone script that saved some of its Dialog parameters. It did so by finding out where the script was installed and created subdirectory for its dialogs parameters.  This failed under windows 7 because of permmisions. It also was not that good of and idea it there were more the one user using the machine for all users parameters would overwrite each others.  So I change the locations to be in the users data application tree for example "Users\User ID\Application Data\JJMack's Scripts\Collage".  It would not surprise me if more scripts start to fail when more user install Windows 7 where permissions more restrictive.

              • 4. Re: could not complete the action, since the destination folder does not exist
                xbytor2 Level 4

                This is the function that I use to determine which folder to use when I need to store preferences, settings, or log files. This works for any version of PS but Folder.userData may not have been added until CS or CS2.

                 

                function getPreferencesFolder() {
                  var userData = Folder.userData;
                
                  if (!userData || !userData.exists) {
                    userData = Folder("~");
                  }
                
                  var folder = new Folder(userData + "/xtools");
                
                  if (!folder.exists) {
                    folder.create();
                  }
                
                  return folder;
                };
                
                

                 

                -X

                • 5. Re: could not complete the action, since the destination folder does not exist
                  saitansky

                  hi,

                  i don't know if i integrate your code correctly, but it doens't work for me. I presently create skin for client and this plugin is really usefull for me.

                   

                  i use win7 64bit home edition, and photoshop cs5

                   

                  there is how i integrate this :

                   

                  // EDIT ALEX GRENIER
                  function getPreferencesFolder() {
                       var userData = Folder.userData;
                       
                       if (!userData || !userData.exists) {
                            userData = Folder("~");
                       }
                       
                       var folder = new Folder(userData + "/xtools");
                       
                       if (!folder.exists) {
                            folder.create();
                       }
                       
                       return folder;
                  };
                  
                  function exportChildren(dupObj, orgObj, dupDocRef, folder) {
                  
                  if (getCSVersion() >= 10) // CS3 Only
                  {
                       // Create assets folder in Flex app's directory
                       // var tempFolder;
                       // tempFolder = new Folder (folder + "/assets/");
                       // tempFolder.create();
                       
                       // EDIT ALEX GRENIER
                       var tempFolder;
                       tempFolder = getPreferencesFolder();
                  

                   

                  i put the code creating the folder in comment and put your code in place, i also put your function before the function creating file.

                   

                  With the base code (without modification) photoshop is able to create my folder assets, but when it try to export the png, it export nothing, so i have a empty folder.

                   

                  thank you,

                  Alex

                  • 6. Re: could not complete the action, since the destination folder does not exist
                    saitansky Level 1

                    Anybody know how integrate the code?

                     

                    Thanks.

                     

                    Regards,

                    Alex