Photoshop Overwrite exisiting file

I'm using this line to write over an exisiting document if it exists already
  save in (localBrandFolder_PSD) as Photoshop format with options myPSDOptions without copying
This doesn't give the expected behaviour.
Previously on other applescript I have used it in this was
save in (localBrandFolder_High_Res & name) as JPEG with options myOptions with replacing
As you can see in this script it turns green and hence won't work.
Any pointers please
Mat

This might help, this is the beginning of the script.
property type_list : {"8BPS"}
property extension_list : {"psd"}
script o
          property theseNames : {}
end script
-- empty log file
do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
set noError to true
--Setup list of folders and process details of folders
set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
set tc to (count dtF)
repeat with i from 1 to tc
          set folderName to item i of dtF --<:  is the folder name, no need to use text item delimiters -->":"
          if folderName does not start with "2_" and folderName does not start with "Hot" and folderName does not start with "Press" and folderName does not start with "Design" then
                    set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
                    set FolderEndName to last text item of folderName
                    set brandName to first text item of folderName
                    set my text item delimiters to "_PSD"
                    set weekNumber to first text item of FolderEndName
                    set my text item delimiters to oldTID
                    set theFolder to ("Hal 9000:Users:matthew:Desktop:" & folderName)
  --set up names to destination folders and create locally based on brand name and week number
                    set this_local_folder to "Hal 9000:Users:matthew:Pictures:2011-2012"
                    set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
                    set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
                    set localBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", localBrandFolder)
                    set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
                    set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
                    set this_Network_folder to "DCKGEN:Brands:Zoom:Brand - Zoom:Upload Photos:2012:"
                    set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
                    set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
                    set website_images to "DCKGEN:Website_Images:"
  --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                    set this_ftp_folder to "Impulse:"
                    set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                    set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
                    set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
                    set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
  --taking the folder identify which process it must follow.
                    if brandName is equal to "Matt" then
                              try
                                        tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                              on error
                                        set o's theseNames to {} -- no psd files or "8BPS"
                              end try
                              set numOfNames to (count o's theseNames)
                              repeat with j from 1 to numOfNames
                                        set thefile to theFolder & ":" & (item j of o's theseNames)
  --    M a t t    Folder Photoshop Process
                                        tell application "Adobe Photoshop CS6"
  -- I remove the command activate, Photoshop stay in background
                                                  try
  open (alias thefile) showing dialogs never
                                                            set myOptions to {class:JPEG save options, quality:12}
                                                            set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                                            tell current document
  --If the quick mask mode has been left on then delete the channel Quick Mask
                                                                      if (quick mask mode) then delete channel ¬
                                                                                "Quick Mask"
  --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                                      if (exists layer "Original Layer") then ¬
                                                                                tell layer "Original Layer" to set name to "Original Image"
  save in (localBrandFolder_PSD) as Photoshop format with options myPSDOptions without copying
                                                                      (delete layer "Original Image") flatten

Similar Messages

  • Overwrite Exisiting Files - error

    I see this questions has come up a few times, but having read the answers it seems i still have a problem.  can someone clarify if i am making an error my workflow please?
    Take images in Folder XXX and develop them
    Export these images to a new folder YYY.  add to catalogue not ticked
    Syncronise YYY and bring in new images.  Apply a develop preset to these images on import
    Export the images in YYY with preset applied as jpegs to YYY for external use.  Select "Overwrite without Warning"
    Error comes up saying this cannot be performed as woudl replace exisitng photo
         My understanding from other threads is this eror should only happen if you try to replace an original, but was designed for exactly my purpose when you are operation on copies.  I am just owndering how LR is meant to know that the imported copy is a copy not an original.  What attribute would tell in that as importing through syncronisation is the same process.  If I used the "add to catalogie" in stage 2. does this let LR know it'sa copy?  If so I could add my preset manually?
    i am using LR 2.5 on Vista 32 bit
    Thanks for any advice.
    Mike

    The bug that allowed overwriting of files present in the catalog was resolved some time ago. LR has no idea what "originals" are, it just won't let you over write files present in its catalog and a good thing to! The over write function is to over write exported images, I use it all the time and it works fine. So if I want a set of images for one purpose I export them to a folder, if I then need them in a different size or whatever I just use the same folder and over write the previously exported files. No need to import these files into LR as I have the "originals" and can always make virtual copies if I need different versions in LR

  • How to save for web AND overwrite original files with Action?

    Hello,
    I want to compress a batch of images with "save for web" using a Photoshop Action, and I also want to preserve my folder structure and overwrite source files. The structure is important because it's complex and needs to be structured this way.
    The Problem:
    When I choose "save for web", I must define a destination. What happens is all optimized files from within the structure are saved in a single location.
    Here's an example of the folder structure
    Folder A
         - Subfolder A1
         - Subfolder A2
    Folder B
         - Subfolder B1
         - Subfolder B2
              -Subfolder B2.2
    Folder C
         -Subfolder C1
    Summary
    Is it possible for me to use a Photoshop Action with "save for web", and overwrite my files without moving them from the structure?

    No need to re-invent the wheel.
    Just learn how to use the Image Processor, Image Processor Pro, or Dr. Brown's Services 1-2-3 in Photoshop and/or Bridge.

  • Could not initialize Photoshop because the file is locked

    I have the problem where you get the Could not initialize Photoshop because the file is locked, where the solution was to fix the properties in the jpg. I did that and tried the Ctrl-Alt-Shft thing too. I pressed them in time and got the message to delete the settings. When I click yes, I still get the "file locked" message. If it is the scratch disk setting problem, I can't get PS open to change it. This problem started when I was opening a locked jpg from a relative. (Now none of my previous pics will open either). Any other ideas other than these that are already listed in the forums? Thanks for any help.
    Technical: Windows XP 5.1, HP7680, Photoshop CS2, 2g ram, more than enough work drives. (no Vista)
    Sequence of events: 1) recd a jpg from a relative in an email and saved it to hard drive. 2) with Photoshop unopened, I rt clkd on the jpg and chose "open with CS2". 3) PS started loading and then stopped with the "file locked" msg. Clkd on OK and PS closed. 4) tried to open PS from the shortcut (and from explorer) and got same result. 5) researched the problem and then used the Ctrl-Alt-Shft approach, got the window that asks to "delete settings" and chose ok, PS closed again. 6) went to the jpg and displayed properties and saw "This file came from another computer and might be locked....", so I clicked "unblock". 7) retried step 2, then 4 with same results. 7) tried to open an old jpg with step 2 and same result (got file locked msg). 8) no longer can bring up the "delete settings" window with the the Ctrl-Alt-Shft approach as it looks like it deleted the settings the 1st time.
    Any ideas???? Thanks again.

    Bob,
    I do not know why a locked JPG would mess up PS. I could see if you always tried to launch PS, by dbl-clicking on the JPG in Windows Explorer, but not from your Desktop shortcut, or from the PS.exe file.
    For the locked file, there is a freeware utility, Unlocker. I do not have a URL handy, but Google should find it for you. It has worked on some network assets, that seemed to lock up on me.
    Good luck, though this might not address your PS launch issue.
    Hunt

  • I am suddenly unable to open my pictures in Adobe Photoshop. It gives the following message: The document "Tina-19.jpg" could not be opened. Photoshop cannot open files in the  "Adobe Photoshop JPEG file" format. What does this mean? I have opened my phot

    I am suddenly unable to open my pictures in Adobe Photoshop. It gives the following message: The document “Tina-19.jpg” could not be opened. Photoshop cannot open files in the  “Adobe Photoshop JPEG file” format.
      What does this mean? I have opened my photos in Adobe Photoshop for years and suddenly I get this message and can't open any of my pictures

    JoeLib wrote:
    You type way faster than me Gene.
    Well, not necessarily in this case.
    According to the time stamp, Gene posted his answer a bit over three hours before you did, Joe.
    Gene's post:       Dec 29, 2014 5:54 PM
    Joe's post:          Dec 29, 2014 8:57 PM

  • I created a file in Photoshop CS5 (a photo) and another in Illustrator CS5 (a graph) to place in my InDesign CS5 brochure. When the Photoshop and Illustrator files are placed in InDesign, they look blurry - whether viewed in InDesign, printed, or saved as

    I created a file in Photoshop CS5 (a photo) and another in Illustrator CS5 (a graph) to place in my InDesign CS5 brochure. When the Photoshop and Illustrator files are placed in InDesign, they look blurry - whether viewed in InDesign, printed, or saved as a PDF. Can anyone give me some tips on how to fix this? Thanks!

    Ask in the program forums
    This forum is about the Cloud as a delivery process, not about using individual programs
    If you start at the Forums Index http://forums.adobe.com/index.jspa
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says ALL FORUMS) to open the drop down list and scroll

  • Overwriting the File in File Adapter

    Hi All,
    I hav a module processor (in Receiver file Adapter)which checks the existence of the file by name DOWN.flg befor writing the file by the same name at the same location. if the file already exists, then it has to wait until another system deletes (as per the requirement). if not, it has to write the file. I had done this successfully with an FTP receiver. but when i'm moving the same functionality to the local drive(now the receiver is a local directory on the XI Server), then i'm getting the following error.
    <b>Error</b>:Attempt to process file failed with java.lang.Exception: Overwriting file '/cpe/data/DEV/XI_/IN/APD/Commander/DOWN.flg' not allowed due to configuration flag
    <b>Error:</b>
    Exception caught by adapter framework: Overwriting file '/cpe/data/DEV/XI_/IN/APD/Commander/DOWN.flg' not allowed due to configuration flag
    these are the errors which i found in the audit log. i din't check the overwrite Existing File option in the Receiver adapter.Can anyone help me out in resolving this.
    Anyhelp wud  b greately apprecited...
    Thnx in Advance.

    Hello Jayakrishnan,
    Thank you very much for the tip, actualy it was very tricky, since the overwrite existing file option is not possible in the "append" mode on my XI version (SP12). THis is what we have done :
    - modify the communication channel to "create" mode and check the "overwrite existing file option".
    - activate it
    - chanche back to the "append" mode
    - activate it again
    And then it works !
    Thanks for your help
    Guislain

  • File Overwriting in File Receiver Communication Channel

    Hi,
    I have an IDoc to File scenario.
    My file receiver communication channel has the following parameters :
    - File name scheme = %timestamp%_AOBSD4RL.MES
      (I'm using variable substition and the variable "timestamp" is initialized at mapping time with the current time in format yyyyMMddHHmmss).
    - File Construction Mode = Create
    - Option "Overwrite Existing File" not activated
    When two inbound messages result in the same target file name, the second one overwrites the first one although the "Overwirte Existing File" setting is not active in the receiver channel.  Is this a bug in XI ? (I'm on 7.00 SP11)
    And is it possible to say to the receiver channel to process only 1 message per second so there will no more target file with same name ?
    Thanks in advance,
    Laurence

    Hi Laurence,
    There is no such facility with Receiver File Adapter to process single message in one step.
    I want to suggest you a may possible way to overcome( it's just an idea), though I never worked with them I think it will work.
    As you the file name is assigned to message with timestamp at receiver communication channel step you can schedule the outbound queue in such a way that it will transfer the message in delay.
    Try to investigate further more, But i m not sure that Queue Scheduling is supported by SP11 or not.
    Regards,
    Shri
    Reward point if it helps you

  • Could not initialize Photoshop because the file is empty.

    I tried to start Photoshop 5.1 64bit today, and it shows the blue intro screen with the reading and loading, and then it goes to a popup error message that reads, "Could not initialize Photoshop because the file is empty." I can run the 32bit version fine, but I would prefer to use the 64bit version. I am running Windows 64bit Ultimate. I have been having issues here and there with CS5.5 on this computer. I ran CS4 fine for the last few years, but since after the upgrade, things have been acting weird. About two weeks ago, InDesign refused to work, so I did a reinstall. Then, two days later, I was having other issues, so I did another reinstall. Before that, Illustrator was having issues, so I had to copy programs files from my office computer to my home computer to make it work. I am starting to wonder if my hard drive is going out. Is there an Adobe fix for just Photoshop? I have the CS5.5 installation DVDs here. I tried copying the Photoshop.exe from my office computer to my home computer and replacing it, but it didn't work either.
    What do you guys recommend? Thanks!

    I am starting to wonder if my hard drive is going out.
    Not necessarily, but it could be hopelessly fragmented and have per-sector damage. Run your disk maintenance tools from the drive's property tab and clean out unnecessary temp files, too.
    Mylenium

  • Adobe Photoshop CS6 won't load on my macbook pro, says "Could not initialize Photoshop because the file was invalid (it has been deleted).

    Adobe Photoshop CS6 won't load on my macbook pro, says "Could not initialize Photoshop because the file was invalid (it has been deleted).

    Tried the preferences, they are not there, tried uninstalling and reinstalling, no love! Any help?

  • Opening Photoshop CS3 psd files in Photoshop CS2 (Mac Tiger 10.411)

    Is it possible to open Photoshop CS3 psd files in Photoshop CS2? After I created them in Photoshop CS3 I reset the preferences to maximize compatibility "always", then I resaved all the psd files. Do you think this will work? I have to open them in CS2 tomorrow at work...

    Also, some old features may have changed in the new version. Specifically, I had some CS3 files from a client that had smart objects that did not open correctly in CS2.
    As I recall, CS2 was able to open a flattened version of the file, just not fully layered with smart objects.
    I actually had CS3 on my laptop, just not on the tower I wanted to work on, so I opened the files on the laptop, rasterized the smart objects, and saved. After this, CS2 opened the files with layers.

  • How to open your Photoshop Touch project file in Photoshop

    How to open your Photoshop Touch project file in Photoshop
    When your files are stored in the Creative Cloud, you can access them on your mobile device using Adobe Photoshop Touch, or on your desktop computer using Adobe Photoshop. Photoshop Touch can open files in the following formats: PSD*, PSDX, PNG, JPG, and GIF. And, with a free plug-in for Photoshop CS5, CS5.1, and CS6 you can open the PSDX files created by Photoshop Touch in Photoshop.
    [Note: PSD files can only be opened via the Adobe Creative Cloud. The file is converted,  layers are flattened to a single layer, and  other info that is only supported in Photoshop is removed.]
    Download the plug-in (if you have CS6, skip this section)
    1. If you have CS5 and CS5.1, you are required to download a plug-in to be able to open your PSDX files in Photoshop. If you have CS6, you are not required to download the plug-in (it is native within the version). In a browser on your desktop computer, navigate to the Creative Cloud Homepage ( https://creative.adobe.com ). Sign-in to Creative Cloud using your Adobe ID, then navigate to the Creative Cloud Apps & Services page (https://creative.adobe.com/apps).
    2. Click download under “Touch App Plug-ins” to start the download and install process. Included with the installer is a plug-in for Illustrator CS6, which enables opening of Ideas files (.idea) in Illustrator, and a plug-in for Photoshop CS5 and 5.1, which enables opening of Photoshop Touch files (.psdx) in Photoshop.
    3. You will be asked (if you haven't already) to install the Adobe Application Manager. Follow the steps to install the manager, and the Touch App Plugin should begin the download and installation process. If it does not, click install next to the “Touch App Plugins” icon in the Adobe Application Manager to start the process.
    4. You're all set to start opening your PS Touch files in Photoshop CS6.
    To save a Photoshop Touch file for upload to the cloud.
    1. Launch Photoshop Touch and ensure that you are in the organizer view. (Tap Done in the upper-left corner of the screen to move from edit view to the organizer view.)
    2. Tap to display the share menu.
    3. Select the file(s) to upload
    4. Select the file format to upload to the cloud. Then tap OK.
    5. Once you save the file format, you have a choice to e-mail the file as a attachment, or save a copy. By pressing cancel, it still can be uploaded to the cloud.
    Uploading PS Touch files to the cloud.
    1. Tap the settings button in the top right corner.  Then tap My Account.
    2. Tap Sign in. Sign in with your Adobe ID. To obtain an Adobe ID, go to : https://www.adobe.com/account/sign-in.adobedotcom.html. Once you are signed in, the total storage available in your Creative Cloud is displayed.
    Sync your Photoshop Touch files to the Creative Cloud.
    1. Tap the Creative Cloud icon. Make sure the Sync files toggle is switched to the on position.
    2. When Creative Cloud sync is turned on, you can see your files being synced to your Creative Cloud account.
    Open a Photoshop Touch file in Photoshop
    1. On your desktop computer, launch a browser and navigate to the Creative Cloud website. When you are signed in, navigate to your Photoshop Touch file. Click to select the file.
    2. Tap the download button in the top right corner.
    3. When the download dialog button pops up, select PSD. Once the file has been downloaded, you can open in Photoshop (CS5, CS5.1, CS6) on your desktop.
    4. When the file is opened in Photoshop, it displays its layers (Note: that if the file is dragged and dropped, and NOT downloaded, it will not display the layers).

    Lightroom 5.3 should be able to open D600 RAW photos.
    The problem is most likely that you used some version of Nikon software to transfer the photos to your computer. This interferes with Lightroom's ability to read the files. If the files are still on your camera card, use Lightroom to directly access them from the camera card. If they are not on your camera card, you can still fix the files, see http://forums.adobe.com/message/6181267#6181267

  • Problem in Overwriting the file in Receiver File adapter

    Hi  all,
    I configured my scenario Proxy to File. Every day the back ground job runs in SAP and send all Employee Details to XI, XI then write it into File in XI server, in Receiver File adapter i enable overwrite existing file.
    But some times its over writing the file some times came up with error like "Access Denied".
    Can any one tell me what could be the problem.
    Kind Regards,
    Kiran

    > But some times its over writing the file some times
    > came up with error like "Access Denied".
    This can be a Authorization problem...may be at that time you are unable to write any file in that directory..or some other application is using it and it make a lock at that time.
    Thanks
    Farooq.

  • Overwrite existing file not working for FTP

    Hi XI Folks,
    I am trying not to overwrite the file at receiver - FTP server.
    It is getting overwritten though I uncheck 'Overwrite existing file' checkbox in FTP. But the same is working fine for NFS. Please find the config details below.
    Receiver communication channel Configuration:
    Transport Protocol : FTP
    File construction mode: Create
    Put File: Use temporary file
    Overwrite existing file : Not checked
    The file is getting overwritten. Iam in SP15.
    Receiver Communication channel Configuration:
    Transport Protocol : NFS
    File construction mode: Create
    Write mode: Use temporary file
    Overwrite existing file : Not checked
    The file is not getting overwritten. It throws an error in Message monitor with wait status.
    Is the "overwrite exist file - checkbox" works only for NFS & not for FTP.
    eagerly expecting relevant response,
    Kiruthika S

    Sasi,
    If we have two files with the same name then what do you want to do? It is the same scenario here? If you dont check the overwrite existing file option then it can write the file also. If you check then it will overwrite. If you dont want this then you can add the timestamp to the existing file. Else you have to make sure of the naming conventions of the file.
    ---Satish

  • CS2/W8 - Could not initialize photoshop because the file is locked

    I just upgraded to Windows 8 64 bit last night.  I had been running Cs2 just fine on Windows 7 64 bit for a few years now.   In fact I used it last week.  Now after the upgrade is complete, I get this error message when I try to launch CS2: 
    Could not initialize photoshop because the file is locked. use the properties command in the Windows Explorer to unlock the file.
    Of course, there is no mention of which file is locked. 
    I tried a repair install, it didnt help, same error. 

    HAve you tried resetting preferences?  Start PS and IMMEDIATELY hold down the shift ctrl alt keys.  Should get a reset window if fast enough.

Maybe you are looking for

  • Problem with iTunes in iPhone 4S

    Hello! I have iPhone 4s in iOS 6. When i go to iTunes via iPhone.. it appears this "1" in red cyrcle. And then I cand ged rid of this.. I tap to retry but still nothing.. I cant delete it also.. Any ideas?

  • ResultSets works only for 6 ... Extremely  Urgent !!

    Hey there ! This is seriously an urgent issue . I can get succesful results for only 6 columns. When I attempt to get another Column( anything > 6),I obtain java.lang.ArrayIndexOutOfBoundsException error. Guys,I suspect its becoz of vector. Actually,

  • ICal to do reminders not showing up on iphone

    I currently create to do items in ical. When I sync with mobileme, they show up in the mobileme calendar. The items show up in Mail under the folder "on my mac" There is also a folder called "mobileme". I have my mobileme calendars synching with mobi

  • About Matthew's book for 1Z0-051

    can i get the e-copy of Matthew's book Study Guide for 1Z0-051: Oracle Database 11g: SQL Fundamentals I: Oracle Certification Prep. an how much it helpful. thanks

  • HELP! Since the upgrade to Maverick, ALL CALENDARS LOST!

    They still show up in my reminders from iCloud when I turn out iCloud syncing of calendars, and they are in my reminder bar on the right side of the screen, however the calendar itself is empty in ical. There are NO calendars listed at all. It's all