Skip navigation
mmoore0904
Currently Being Moderated

Is there anyway to create a watched/monitored folder for actions (similar to distillar for PDFs)

Jul 31, 2012 3:04 AM

Tags: #web #cs5.5 #premium #batch #folder #actions #droplet #watched

Is there any way to set up a watched folder in Photoshop to automatically batch run an action on any image that is dropped into that particular folder?

Similar to how distillar works for PDFs.

I have Creative Suite Web Premium 5.5 so if any of the other packages in the suite will do the job please let me know as I can't seem to find it.

A droplet won't do the job as although the processing will take place on my machine - the image may be dropped into the folder by a colleague elsewhere.

Thanks.

 
Replies
  • Currently Being Moderated
    Jul 31, 2012 3:39 AM   in reply to mmoore0904

    G'day

     

    Untested, but a folder action attached to a desktop folder called something like "Drop Photoshop Files Here" and also a desktop folder call "Processed Folder" might do it, using this untested script.

     

    on adding folder items to this_folder after receiving list_of_files

              set ptdpf to path to desktop & "Processed Folder" as text

              tell application "Adobe Photoshop CS6"

                        repeat with this_File in list_of_files

      open this_File

      --do action <name of PS action> from <action set>

      close window 1

                        end repeat

              end tell

              tell application "Finder"

      move list_of_files to ptdpf

              end tell

    end adding folder items to

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 31, 2012 7:35 AM   in reply to OzSanta2

    I've done some investigating, and Photoshop can Batch Process the files.

     

    You'll need to create three folders on your desktop...

     

    Photoshop Processing

    Processed Images Folder

    Processed Stored Folder

     

    Attach the following script to the first folder. Save the script in 'Library/Scripts/Folder Action scripts' and then right click on the Folder 'Photoshop Processing' and attach the script.

     

    I AM asssuming your running a Mac with all this. I'm also assuming the original files are left untouched in the first folder, and need shifting after they're processed. I'm running a trial version of CS6 on my iMac, and it tells me Batch Processing isn't available, so I can't test it.

     

    on adding folder items to this_folder after receiving PhotoshopFiles1

              tell application "Finder"

                        set ptd to path to desktop as text

                        set ptdpp to ptd & "Photoshop Processing" as text

                        set ptdpif to ptd & "Processed Images Folder" as text

                        set ptdpsf to ptd & "Processed Stored Folder" as text

                        set fileToLog to (ptdpif) & ":Photoshop_Batch_Errors_Log.txt" as text

                        set PhotoshopFiles to document files of folder ptdpp as alias list

      say (count of PhotoshopFiles)

                        if not (exists file fileToLog) then

                                  make new file at ptdpif with properties {name:"Photoshop_Batch_Errors_Log.txt"}

                        end if

              end tell

              tell application "Adobe Photoshop CS6"

      activate

                        set display dialogs to never

      batch "Wood Frame - 50 pixel" from "Default Actions" from files PhotoshopFiles with options {destination:folder, destination folder:alias ptdpif, error file:alias fileToLog, macintosh compatible:true, file naming:{document name lower, extension lower}, suppress open:true, override save:true}

              end tell

              tell application "Finder"

      move PhotoshopFiles to ptdpsf

              end tell

    end adding folder items to

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 2:51 AM   in reply to OzSanta2

    According to the Applescript Users Group, Batch hasn't worked since at least CS4, that's why the error messages. Darn Adobe, they  include it in their Scripting Guides.

     

    This works, but depending on the action, you might get a dialog box that, again, Adobe in their stupidity have decided can't be turned off with scripting. This also renames duplicate files.

     

    Regards

     

    Santa

     

    on adding folder items to this_folder after receiving PhotoshopFiles

              try

                        set ptd to path to desktop as text

      --set ptdpp to ptd & "Photoshop Processing" as text

                        set ptdpp to this_folder as text

                        set ptdpif to ptd & "Processed Images Folder" as text

                        set ptdpsf to ptd & "Processed Stored Folder" as text

                        set fileToLog to (ptdpif) & ":Photoshop_Batch_Errors_Log.txt" as text

                        tell application "Finder"

                                  if not (exists folder ptdpif) then

                                            make new folder at folder ptd with properties {name:"Processed Images Folder"}

                                  end if

                                  if not (exists folder ptdpsf) then

                                            make new folder at folder ptd with properties {name:"Processed Stored Folder"}

                                  end if

                                  if not (exists file fileToLog) then

                                            make new file at folder ptdpif with properties {name:"Photoshop_Batch_Errors_Log.txt"}

                                  end if

                                  set PhotoshopFiles to files of folder ptdpp as alias list

                        end tell

      say (count of PhotoshopFiles)

      delay 4

                        tell application "Adobe Photoshop CS6"

      activate

                                  repeat with this_File in PhotoshopFiles

                                            tell application "Finder"

                                                      set file_Name to name of this_File

                                                      set file_Extension to "psd" --default Save name extension of this_File

                                                      set file_Name2 to characters 1 through -((count of file_Extension) + 2) of file_Name as text

      display dialog file_Extension

                                                      set file_to_save to (ptdpif & ":" & file_Name2 & "." & file_Extension as text)

                                                      set x to 1

                                                      repeat

                                                                if not (exists file file_to_save) then exit repeat

                                                                set file_to_save to (ptdpif & ":" & file_Name2 & " " & x & "." & file_Extension as text)

                                                                set x to x + 1

                                                      end repeat

                                            end tell

      open this_File

      --set display dialogs to never

                                            try

      do action "Wood Frame - 50 pixel" from "Default Actions" without notifiers enabled and display dialogs -- < this particular action brings up a dialog box which can't be addressed with Applescript

      save current document in file file_to_save with copying -- < set to 'without copying' if original files not required

                                            on error errmsg

      display dialog errmsg -- < write to ":Photoshop_Batch_Errors_Log.txt" here

                                            end try

                                            try

      close document 1 saving no

                                            end try

                                            tell application "Finder"

                                                      set file_to_store to (ptdpsf & ":" & file_Name2 & "." & file_Extension as text)

                                                      set file_Extension to name extension of this_File

                                                      set x to 1

                                                      repeat

                                                                if not (exists file file_to_store) then exit repeat

                                                                set file_to_rename to (ptdpsf & ":" & file_Name2 & " " & x & "." & file_Extension as text)

                                                                if not (exists file file_to_rename) then

                                                                          set name of file file_to_store to (file_Name2 & " " & x & "." & file_Extension as text)

                                                                          exit repeat

                                                                end if

                                                                set x to x + 1

                                                      end repeat

                                                      try

      move this_File to folder ptdpsf

                                                      on error

                                                                try

      move this_File to folder ptdpsf with replacing

                                                                on error errmsg

      display dialog errmsg -- < write to ":Photoshop_Batch_Errors_Log.txt" here

                                                                end try

                                                      end try

                                            end tell

                                  end repeat

                        end tell

              on error errmsg

      display dialog errmsg

              end try

     

    end adding folder items to

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points