Appending a file name to a file in photoshop

I have a work flow that takes a bunch of files and sets them up in a certain way. I then have an action that goes through and sets the files up for a delivery to a client. I do not want to run multiple actions and would like to have them save into one folder with the correctly appended file name. This obviously cant be done in an action, and a batch means that I have to create five different actions and sit there five different times to create the batch delivery. I would like one action that calls a script that saves the file with the appropriate file name.
Here is what I have.
Working file.psd
Runs an action. Flattens file in a certain way
saves a file out names "filename"_Large.tiff
resizes the image to 5x7
saves file out named "filename".tiff
flattens file
saves file out named "filename".jpg
creates a few different layers
saves file out named "filename"_ghost.tiff
flattens file
saves file out named"filename"_ghost.jpg
I have the action that runs all of this flawlessly, but I have to save them to different folders and on the next job I will have to update all teh file locations. I would like to just specify a folder location in my batch and have a script append the appropriate filename where need be.
which would be
_large
_ghost
any help would be awesome. IF not i will continue to just run them manually. into different folders, rename, and update the folder locations and saves each time.

c.pfaffenbichler wrote:
I would like one action that calls a script that saves the file with the appropriate file name.
So why don’t you ask for help over in the Photoshop Scripting Forum?
thanks buddy, really helpful to be snarky... dont worry on the internet you are super cool!!!
a 5x7 is a 5x7 right 5x7 millimeters, centimeters, feet, inches, yards... what does it matter, I am not looking for you to write the action it is written. If you could read what I wrote and understand the words I was using, you would have seen that. But no you wanted to show up and be incredibly helpful. I bet I could look through  your recent replies and they are all exactly like this... nothing helpful just, im going to show up on threads and give absolutely zero advice that is useful.
I was only asking for a script that could be written that i coudl call within an action to do a save as with an appended name....
thanks buddy!

Similar Messages

  • Append SFW file name in action

    Sorry if this has been answered before. I found a lot of similar questions but no answers.
    If I record an action that includes Save for Web, I can either leave the name unchanged (and the individual file name will be used when I play the action) or change the name (and that name will be used every time I play the action). But it does not let me append the file name.
    For example, I want to create 3 sizes of each image and have each one named filename_sm.jpg, filename_md.jpg and filename_lg.jpg.
    Currently, I export each size to a different folder (with the original file name), use NameChanger to append the name, then move the images to their final destination. I thought that, in its 12th incarnation, Photoshop would have a more efficient way of dealing with this issue.

    xbytor has provided Scripts that convert Actions to JavaScript named »ActionToJavascript.jsx« and »ActionFileToJavascript.jsx«.
    You should be able to find them on this site
    http://www.ps-scripts.com/
    And you can use »ScriptingListener.plugin« (by moving it into the »Automate«-Folder) to record what you do in Photoshop (not brush-work, though, I’m afraid, basically steps that would also record in an Action) to use in JavaScript later on.
    What's missing from the actions is a way to edit them, You can re-record a step but you cannot edit it to fine-tune it.
    The way I see it, you can either have it real simple and use Actions or somewhat more involved and use Scripts.
    Anyway, you could look over in the Feature Request Forum if the features you do miss have been requested in the past and add your support or create a new request.
    I guess it is a bit like with the gears of a car – you can probably get around never using the fourth gear if you never drive on highways, but for certain purposes it might be beneficial to use it after all.
    Same with Photoshop Scripts – you can be a proficient and efficient creator/editor of amazing images in Photoshop without using custom Scripts, but certain tasks (which may or may not be relevant to your work) run »smoother« with Scripts.

  • Date appended to file name

    Hi
    I want to append date to my attachement name, to achieve this I went to scheduling and scheduled my report and gave attachment name as my_file_%y%m%d as specified by Tim in his blog (http://blogs.oracle.com/xmlpublisher/2009/12/dynamic_delivery_file_naming.html), but it is just giving the characters as they are instead of year month date appended to file name, my output is excel and our environment is standalone BIP.
    Anyone help me on this.
    Edited by: user8937215 on Sep 2, 2010 7:04 AM

    Please check if the thread Re: Can I append date to the file name using Bursting helps

  • Append swf file - Spry.Utils.updateContent - not work

    I don't understand this
    When I try to add swf file to Spry Tabbed Panels content -
    everything is OK. Now - in tabbed panels content I want to insert
    data from external html files. In this external file I have swf
    file and text, and images. When I preview this html external file
    in browser - all data are displayed correctly. When I try append
    this file into tabbed panels content :
    <a href="#" onclick="Spry.Utils.updateContent('apDiv1',
    'products/products1.htm'); return false;">Append file</a>
    only swf file in a new window are display.
    If I delete swf content from external html file - everything
    is ok. But if in external append file is a swf content - IE display
    only swf file.
    Is there posible to append html file with swf file in this
    method in any way?

    Hi Elaine,
    The implementation of AC_FL_RunContent() suggests that it was
    only meant to be run *BEFORE* the page finishes loading. Because
    Spry data sets and regions load and redraw asynchronously, usually
    *after* the page finishes loading, they are not compatible. As
    we've mentioned above, if Spry triggers the call to
    AC_FL_RunContent(), it will most likely be *after* the onload event
    has fired, and since AC_FL_RunContent() uses document.write() it
    will result in the entire page being overwritten by the
    <object>/<embed> tag that it writes out.
    That all said, libraries like SWFObject were designed to be
    called even after the onload event fires, at least from what I can
    tell from their samples. If you need to extract data from a data
    set to create your SWFObject, you can simply attach an observer to
    your data set that will tell the swfobject to do what it is you
    want it to do. For example:
    <script type="text/javascript">
    var dsProducts = new Spry.Data.XMLDataSet("products.xml",
    "/products/product");
    // Register an observer on dsProducts so that any time it
    changes data or the current
    // row changes, it tells the swfobject what to do:
    dsProducts.addObserver(function(notificationType, notifier,
    data)
    if (notificationType != "onDataChanged" || notificationType
    != "onCurrentRowChanged")
    return;
    // Do something with the swfobject here:
    var curRow = dsProducts.getCurrentRow();
    // The following embedSWF call is only an example of how to
    get the "productURL" column
    // value for the current row and pass it to the swfobject.
    The rest of the args, are left as names to
    // show you what you should be passing.
    swfobject.embedSWF(curRow.productURL, replaceElemIdStr,
    widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj,
    parObj, attObj);
    </script>
    --== Kin ==--

  • How to merge/append two files in sequence using BPM

    Hi All,
    My senario is to append two files data into a  new file on target system, only if the two files are available on source system. In case one file on the source system, no need to process file. Data in the new file should be in sequence means 1st file data then 2nd file data.
    Please suggest me how can i achieve this functionality using BPM.
    Thanks & Regards
    Sreeni

    For the first part (two files required) design as per Prateek's suggestion
    Data in the new file should be in sequence means 1st file data then 2nd file data.
    create a data structure which will be a combined structure of File1 and File2....target structure should have first reference for File1 and then for FIle2....than having two MTs (File1 and File2) at the source and the target MT at the receiver create your mapping......this will ensure that File1 data occures first and then File2 data.
    Regards,
    Abhishek.

  • How to append a file in a trigger?

    I'm writing from a table to a file, and have created a trigger that works great...however, I need to append the file so it doesn't overwrite the file every time the trigger fires.
    Here's the code...but I can't figure out how to append the file instead of just write to the file:
    CREATE OR REPLACE TRIGGER checkout_trg
    AFTER UPDATE OF movie_qty ON mm_movie
    FOR EACH ROW
    DECLARE
    fh UTL_FILE.FILE_TYPE;
    BEGIN
    IF :NEW.movie_qty=0 THEN
      fh:=UTL_FILE.FOPEN('ORA_FILES','chekcout.txt','w');
      UTL_FILE.PUT_LINE(fh, 'Date: '||sysdate||', Movie ID: '||:NEW.movie_id||', Quantity: '||:NEW.movie_qty);
      UTL_FILE.FCLOSE(fh);
    END IF;
    END;
    /

    > It's for an assignment...I think thye're just trying to show us what's possible.
    Just as it is possible to show a learner driver to jump a red light, drive on the wrong side of the road, or do doughnuts in an intersection...
    But none of this will make that learner driver a good driver. Never mind able to correctly handle high performance cars on the professional circuit.
    Sorry mate - what they are showing/teaching you is pure bs. A trigger is not the "same thing" as a callback event in client programming.
    And feel free to give them this URL and tell them that I think they are full of it. Let's see how they defend their non-real world, totally irrelevant and wrong assignments in this very forum.

  • How can I append excel file rather than replace it?

    Hi,
    I have the attached VI set to write data to Excel, One case structure sends the data to cell B6, the other sends the data to cell B7. The problem is, the data is deleted from one cell when new data is added to another.
    I think I want to be able to append the data without deleting other cells. Any ideas?
    Thank you
    Todd
    Attachments:
    Flow meter write to Excel question.vi ‏180 KB

    Toddzilla,
    There are a couple different ways to append to excel files.  A couple links that might get you going are:
    Can I Add New Data to an Existing Excel File Without Erasing Old Data?
    Append Data to an Excel Document Every Iteration Using Report Generation Toolkit
    Are you trying to write over cells B6 or B7, or are you trying to append within the cell itself?  
    Hopefully this can get you on the right track.  When I append to files I tend to insert rows or append to the end of the file.
    Scott A
    SSP Product Manager
    National Instruments

  • Append binary file

    I would like to append new binary values to the existing binary file. Write File.vi looks like a good candidate for this, and it has two inputs, pos. mode and pos. offset which looks like something useful for my task. Unfortunately whatever I put into pos offset input I got Error 4 �end of file� and whatever I put into pos. mode nothing changes in binary file. There is also no example on the web which makes any use of them.
    Please can you tell how I can simply append new binary values to existing binary file. I put vi. In attachment which will write binary file, but only once.
    Thanks,
    Zoran
    Solved!
    Go to Solution.
    Attachments:
    bin_file_write.llb ‏396 KB

    Will this work if I have a situation like this ?
    I have a DAQ VI which gives me about 32667 events in about 10 loops. I want to append these events onto a binary file after every iteration. I followed the message conversations regarding the append binary file but for some reason only the latest set of events are recorded. Will this work in a loop ?
    Kudos always welcome for helpful posts

  • Reading, comparing and appending two files is taking lot of time

    public static void main(String args[])
         BufferedReader bSource = null;
         String sSource="";
         String sSourceData="";
         BufferedReader bDestination = null;
         String sDestination="";
         String sDestinationData="";
         try
              bSource = new BufferedReader(new FileReader("C:/TEMP/Source.map"));
              while((sSource = bSource.readLine()) != null)
                   sSourceData+=sSource;
              bDestination = new BufferedReader(new FileReader("D:/TEMP/Destination.map"));
              while((sDestination = bDestination.readLine()) != null)
                   sDestinationData+=sDestination;
         catch(IOException ioe)
              System.out.println(ioe.getMessage());
         finally
              try
                   bSource.close();
                   bDestination.close();
              catch(Exception e)
         if(sDestinationData.contains(sSourceData))
              fDestinationFlag=false;
         else
              fDestinationFlag=true;
         if(fDestinationFlag)
              BufferedReader br2 = null;
              BufferedWriter bw2 = null;
              try
                   br2 = new BufferedReader(new FileReader("C:/TEMP/Source.map"));     
                   bw2 = new BufferedWriter(new FileWriter("D:/TEMP/Destination.map",true));
                   while((line2 = br2.readLine()) != null)
                        bw2.write(line2);
                        bw2.newLine();
                        bw2.flush(); 
              catch(IOException ioe)
                   System.out.println(ioe.getMessage());
              finally
                   try
                        br2.close();
                   catch(Exception e)
                   try
                        bw2.close();
                   catch(Exception e)
    }I am comparing the contents of the two files Source.map (containing 3 lines) and Destination.map (containing 5000+ lines). The contents of the Source.map gets appended in the Destination.map only if it does not contain the same.
    Now my program is doing the necessary, but it is taking lot of time. It's taking 1 min 26 seconds.
    Could anyone please tell me what do I modify in may program to make it execute much faster.

    1) Just compare the byte content - no need to convert to Strings.
    2) Compare a block (say 256K bytes) at a time - no need to read the whole file into memory.
    3) Compare the file lengths first - if they are different then the content cannot be the same.
    4) When appending one file to the other, set the 'append' flag in the constructor of FileOutputStream to true.

  • Write to spreadsheet append to file

    Hi,
    I have two 2D data from measurement like those:
    the first:
    -1.000000E+0    5.102000E-10
    -9.000000E-1    4.069000E-10
    -8.000000E-1    3.149000E-10
    -7.000000E-1    2.329000E-10
    the second:
    1.505356E-2    8.315681E+10
    1.556519E-2    8.639427E+10
    1.604228E-2    8.955526E+10
    I used "write to spreadsheet" function to write to the file, for the second one, i set the "append to file" to "True". However, it will append the data at the bottom of the file. How can I append them side by side like:
    -1.000000E+0    5.102000E-10   1.505356E-2    8.315681E+10
    -9.000000E-1    4.069000E-10     1.556519E-2    8.639427E+10
    -8.000000E-1    3.149000E-10      1.604228E-2    8.955526E+10
    -7.000000E-1    2.329000E-10
    Thank,
    Joyce
    Solved!
    Go to Solution.

    Hi Joyce,
    as a spreadsheet file is just a text file with some special formatting codes it will always append at the bottom...
    But you can:
    Load the first data, attach the new data in RAM (using any order you like), write a whole new spreadsheet file!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Appending XML file

    Can somebody help me?
    I have a program that creates an XML file but every time I run the program I want that file to be appended. I can append the file but with XML I need to append the file before the final closing tag.
    This is my code:
    <%@page contentType="text/html"%>
    <html>
    <head>
    <basefont face="Arial">
    </head>
    <body>
    <%@ page language="java" import="java.io.*" %><%
    %><%@taglib uri="/WEB-INF/taglib65.tld" prefix="go"%>
    <%@taglib uri="/WEB-INF/filetags.tld" prefix="file"%>
    <form method=GET action="output.jsp">
    <%
    String xposition = request.getParameter("position");
    String ynflteam = request.getParameter("nflteam");
    String zplayer = request.getParameter("player");
    %>
    <%
    if(xposition.equals("position")){
    %>
    <go:Back alert="Please Select The Player's Position!"/>
    <%
    }else if(ynflteam.equals("nflteam")){
    %>
    <go:Back alert="Please Select The Player's NFL Team!"/>
    <%
    %>
    <file:writeFile source="c:\\nfl.xml" append="true">
    <fantasyteam>
    <position><%= xposition %></position>
    <nflteam><%= ynflteam %> </nflteam>
    <playername><%= zplayer%></playername>
    </fantasyteam>
    </file:writeFile>
    <%
    out.println("Player: " zplayer " has been added to your team");
    %>
    <br><br>
    <input type="Submit" value="Continue">
    </FORM>
    </form>
    </body>
    </html>
    It creates the XML file but when I go to add another entry and view the file it won't display because the file was closed by the previous entry.
    Eg:
    <fantasyteam>
    <position>RB</position>
    <nflteam>New York Jets</nflteam>
    <player>Curtis Martin</player>
    </fantasyteam> ----- HERE THE XML FINISHES
    <fantasyteam> ---- HERE IS ANOTHER ENTRY BUT IT WON'T WORK DUE TO THE CLOSING </fantasyteam> TAG!
    <position>WR</position>
    <nflteam>New York Jets</nflteam>
    <player>Santana Moss</player>
    </fantasyteam>
    What I want the file to look like is:
    <fantasyteam>
    <position>RB</position>
    <nflteam>New York Jets</nflteam>
    <player>Curtis Martin</player>
    <position>WR</position>
    <nflteam>New York Jets</nflteam>
    <player>Santana Moss</player>
    </fantasyteam>
    Can anyone help?
    Thanks
    Michael

    Hi,
    I think there are two ways. When using DOM in your file:write-method, you must parse the old file, add th enew nodes and then write the change document in the file. By the other way, without DOM, read the old file in a StringBuffer, delete the end with String-operations, append your new nodes as String, also the close-tag and wirte the change StingBuffer in the file.
    Hope thats help.
    Roland

  • Db link not appended to table name

    Hi
    I have no DB link appended to table name in generated
    code when I try to deploy mapping.
    i'm using ODBC source. Object metadata imported
    succefully and valid DB link created.
    the code i get is like this:
    CURSOR "managers_c" IS
    SELECT
    "managers_CONN1"."key_mn" "key_mn",
    "managers_CONN1"."name_mn" "name_mn",
    ROWNUM "ROWNUM_ALIAS$$$"
    FROM "tst"."managers" "managers_CONN1" ;
    I'm using OWB 9.0.4 and Oracle 9iR2 9.2.0.3 on W2K sp3
    thanks

    I would also be interested in the correct way to do this. I think I came up with a work-around, but either there is another way to do this, or there is a bug here.
    Work-around:
    This assumes you've already setup a HS ODBC datasource (Listener, TNSNames, ODBC driver, and config file.)
    Now....when registering your HS ODBC source module in OWB, put in the correct information to make the database link "correct". For instance, the hostname/port should be configured to point to the Oracle instance where the HS ODBC source was setup and the service name should be the name already setup in your TNSNames.ora file for the HS ODBC source.
    When you deploy your target module, this will create a correct DB Link and store it in the target schema you deployed to.
    At this point however, your generated PL/SQL mapping code will not be correct, because the dbLink name is not appended to your sql statements.
    Now, go back and change your source module registration. Change the hostname to be the server name of the actual source database. Change the schema name also to be the schema in the source database. For instance in sql server you might put "dbo" as the schema. I don't think the other input fields matter that much for this workaround.
    Now that you've changed the registration, re-deploy your mapping (but don't re-deploy the "connection" which has your changed registration info.) Now that your registration has a different hostname, the code generator will realize it needs to append the dbLink name to the sql statements. Likewise it appends the schema name ("dbo") to the front since the source and target are in different schemas.
    Your deployment should succeed and be executable. Like I said, this worked for me, but it doesn't seem the correct way to do it. If anyone has the right answer, please advise.
    Regards,
    Dave

  • Windows 7/Bridge won't open files in Photoshop CS6 (cloud)

    I recently got the cloud CS6 and installed photoshop cs6, then uninstalled CS5.5. But now, Windows Explorer cannot seem to find Photoshop. If I try to associate the default for any file (.jpeg, .tiff, etc.) with Photoshop, Photoshop does not show up on the list of programs. I must browse to find  Photoshop exe (CS6 64). I click okay, but it continues to open the file in Windows picture viewer and to associate that file type with Windows Picture Viewer.
    If I right-click on the file, it does exactly the same thing. I must browse to Photoshop.exe. But it still opens the file in Windows Picture Viewer.
    Fix 1 Try Bridge Associations: I opened Bridge CS6->Edit>Preferences and made sure the files were associated with photoshop. But, when I then try to open the files from within Bridge, I get the message Windows cannot find c:Program Files\Adobe\AdobePhotoshop CS4 (64Bit)\Photoshop.exe. (my emphasis)  But I haven't had CS4 installed for years. I did not have this problem when I installed CS5. So now I can't open files from either Windows explorer or Adobe Bridge.
    Fix 2 Fix the Registry: So, I opened Regedit and went to HKEY_CLASSES_ROOT\Applications\Photoshop.exe\shell\open\command, and changed the (Default) from "C:\Program Files\Adobe\Adobe Photoshop CS5.1 (64 Bit)\Photoshop.exe" "%1" to "C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Photoshop.exe" "%1" . Don't know why the install left this at CS5.1. It SHOULD have changed it. EUREKA! Windows now recognizes Photoshop CS6 and I can associate files with it as usual. But I had to manually associate the native .psd file with Photoshop. along with .jpeg, .tiff and other image files.
    No Fix for Bridge: But back in Bridge CS6, it's not so rosy. I still get Windows cannot find c:Program Files\Adobe\AdobePhotoshop CS4 (64Bit)\Photoshop.exe. Make sure you typed the name correctly, and then try again. If I try File--Open with--Photoshop (default), I get the same message. Clearly, Bridge thinks Photoshop CS4 is the default, and I don't know where to change that association. Preferences does not allow browsing. So Bridge is pretty much useless.
    So what should I do about Bridge?
    Bridge CS6 still won't open Photoshop CS6. It's still looking for CS4. I thought about reinstalling Bridge, but when I try to download it, the cloud tells me it is is already installed and won't download. I am a little worried about uninstalling it and trying again. Maybe, I'll end up with no Bridge at all. I am beginning to regret my decision to go cloud. Don't know if the install mess is just cloud or noncloud versions as well. Doesn't seem to apply to all programs either.
    Postcript:
    I had to go to the registry and manually change CS5.1 to CS6 for InDesign and Illustrator as well, and then manually associate .indd and .ai files with those programs. What a pain this is. Obviously, the install program didn't change the normal associations to CS6. Left them with the CS5, and then when I uninstalled that--as anyone would normally do--it lost the association completely.

    Thank you David__B! Your suggestion worked perfectly. All the files are correctly associated in both Explorer and Bridge. And it didn't take all that long, mostly uninstalling. The Adobe App Manager very efficiently installs several different programs with very little fuss.
    I am not sure, but I think it may have been an old plug-in to Bridge back in the CS4 era that I didn't even know I had that was causing the Bridge file association problems. Uninstalling CS5 after installing CS6 seems to be causing Win Explorer problems, not just for me.  Based on this experience, I would recommend that anyone with several previous installations of Adobe CS do the following:
    Save your plugins and preference files in a back up file.
    Uninstall all the old adobe software.
    Run the the cleaner you suggested. (http://www.adobe.com/support/contact/cscleanertool.html).
    Install CS6 programs from the CCloud or wherever.
    Add your plug-ins back in as you need them one at a time to be sure they work.
    If you have already installed CS6 and are having file association problems, just uninstall everything and start at step one. You probably won't save time trying to fix the registry and manually associate file types--- yada yada yada.
    Steps 1-6 will give you a nice clean install and salvage only  good plug-ins.
    Beth

  • Get current file of Photoshop.

    All I want to do is from with in photoshop (the user applescript folder) is run this script but rather than select a file, use the open file on photoshop and process (there maybe others open so it would need to get the current document and file name)
    Many Thanks
    Matt
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
              property theseNames : {}
    end script
    set thefile to (choose file) as text --> the file path
    tell application "Finder" to set TheName to (name of file thefile) --> the name
    set the1stLetter to the first character of TheName --> the first letter
    set the2ndLetter to the second character of TheName --> the first letter
    set brandInitial to {the1stLetter, the2ndLetter} as text
    if brandInitial is equal to "BH" then ¬
              set brandName to "BRAND"
    if brandInitial is equal to "AL" then ¬
              set brandName to "BRand"
    set weekNumber to ""
    display dialog "Please enter the week number:" default answer weekNumber
    set weekNumber to text returned of result
    try
              if weekNumber = "" then error
              set theWeekNumber to theWeekNumber as number
    on error
              set thePrefix to "INVALID ENTRY! "
    end try
    --Folder location Setup
    set this_local_folder to "Images:2012-2013"
    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:2013:"
    set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
    set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
    --all files for website
    set website_images to "DCKGEN:Website_Images:"
    --set up names to destination folders and create over Network 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)
    --set theFolder to eachItem as string -- I think this is the line that could be causing the problem.
    --taking the folder identify which process it must follow.
    if brandName is equal to "BRAND" then
              tell application "Adobe Photoshop CS5.1"
      -- I remove the command activate, Photoshop stay in background
                        set ruler units of settings to pixel units
                        try
      open (alias thefile) showing dialogs never
                                  set origName to name of current document
                                  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 & origName) as Photoshop format with options myPSDOptions without copying
                                            (delete layer "Original Image") flatten
      resize image resolution 300 resample method none
      --sharpen image
      filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
      save in (localBrandFolder_High_Res & name) as JPEG with options myOptions without copying
      --get file path, return path of the JPEG file, work with (without copying)
      -- (with copying) : it return path of PSD file
                                            set newFile to file path --( return path of type alias )
      -- duplicate file using the Finder  -->on duplicateFile(..)
                                            my duplicateFile(newFile, {ftpBrandFolder_High_Res})
      --Prepare for Low RES by resetting image history
                                            set current history state to history state 3
      flatten
      resize image width 1348
      resize image resolution 300 resample method none
      filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
      --add save to lowResFolder with same options
      save in (localBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                            set newFile to file path
                                            set newFile2 to newFile as string -- for testing end of name
                                            if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" then -- exclude website_images
                                                      my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res})
                                            else
                                                      my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res, website_images})
                                            end if
      close saving no
                                  end tell
                        end try
              end tell
      --End BH
    end if
    --then the next etc.
    on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
              tell application "Finder" to repeat with folderPath in foldersPath
                        with timeout of 200 seconds -- adjust it,  error if the copy  is longer that 200 seconds
      duplicate tFile to folder folderPath with replacing
                        end timeout
              end repeat
    end duplicateFile
    on getFolderPath(tName, folderPath)
              tell application "Finder" to tell folder folderPath
                        if not (exists folder tName) then
                                  return (make new folder at it with properties {name:tName}) as string
                        else
                                  return (folder tName) as string
                        end if
              end tell
    end getFolderPath

    Ok,  there is improvement, the script gets the path without error.
    Test this script in the editor., don't use your script.
    tell application "Adobe Photoshop CS5.1"
          set thefile to (file path of current document) --> get the file path (an alias)
    end tell
    set thefile to thefile as string
    tell application "Finder" to set TheName to (name of file thefile) --> the name
    set the1stLetter to the first character of TheName --> the first letter
    set the2ndLetter to the second character of TheName --> the first letter
    set brandInitial to {the1stLetter, the2ndLetter} as text
    if brandInitial is equal to "BH" then ¬
          set brandName to "BRAND"
    if brandInitial is equal to "AL" then ¬
          set brandName to "BRand"
    set weekNumber to ""
    display dialog "Please enter the week number:" default answer weekNumber
    set weekNumber to text returned of result
    try
          if weekNumber = "" then error
          set theWeekNumber to theWeekNumber as number
    on error
          set thePrefix to "INVALID ENTRY! "
    end try
    --Folder location Setup
    set this_local_folder to "Images:2012-2013"
    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:2013:"
    set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
    set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
    --all files for website
    set website_images to "DCKGEN:Website_Images:"
    --set up names to destination folders and create over Network 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)
    --set theFolder to eachItem as string -- I think this is the line that could be causing the problem.
    --taking the folder identify which process it must follow.
    if brandName is equal to "BRAND" then
          tell application "Adobe Photoshop CS2" --5.1"
                -- I remove the command activate, Photoshop stay in background
                set ruler units of settings to pixel units
                try
                      set myOptions to {class:JPEG save options, quality:12}
                      set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                      tell (my getDocByPath(thefile))
                            set origName to name
                            --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 & origName) as Photoshop format with options myPSDOptions without copying
                            (delete layer "Original Image") flatten
                            resize image resolution 300 resample method none
                            --sharpen image
                            filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                            save in (localBrandFolder_High_Res & name) as JPEG with options myOptions without copying
                            --get file path, return path of the JPEG file, work with (without copying)
                            -- (with copying) : it return path of PSD file
                            set newFile to file path --( return path of type alias )
                            -- duplicate file using the Finder  -->on duplicateFile(..)
                            my duplicateFile(newFile, {ftpBrandFolder_High_Res})
                            --Prepare for Low RES by resetting image history
                            set current history state to history state 3
                            flatten
                            resize image width 1348
                            resize image resolution 300 resample method none
                            filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                            --add save to lowResFolder with same options
                            save in (localBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                       set newFile to file path --( return path of type alias )
                                                              set newFile2 to newFile as string -- for testing end of name
                            if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" then -- exclude website_images
                                  my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res})
                            else
                                  my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res, website_images})
                            end if
                            close saving no
                      end tell
                end try
          end tell
          --End BH
    end if
    --then the next etc.
    on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
          tell application "Finder" to repeat with folderPath in foldersPath
                with timeout of 200 seconds -- adjust it,  error if the copy  is longer that 200 seconds
                      duplicate tFile to folder folderPath with replacing
                end timeout
          end repeat
    end duplicateFile
    on getFolderPath(tName, folderPath)
          tell application "Finder" to tell folder folderPath
                if not (exists folder tName) then
                      return (make new folder at it with properties {name:tName}) as string
                else
                      return (folder tName) as string
                end if
          end tell
    end getFolderPath
    on getDocByPath(tFile)
          set f to tFile as alias
          tell application "Adobe Photoshop CS5.1"
                repeat with i in (get documents)
                      if file path of i is f then return contents of i --return the doc
                end repeat
          end tell
    end getDocByPath
    If there is an error, give me the selected text in the editor and the error
    Message was edited by: Jacques Rioux

  • Can't place PDF file in Photoshop

    I used to be able to place PDF files into a Photoshop file (PSD), but now I get an error reading:
    Cannot place the document 'Document Name.pdf' because of a program error.
    It does not tell me what the error is or how to correct it.
    I recently uninstalled and reinstalled Photoshop because of a different issue, so I'd rather not go through that process again if it's unnecessary.
    PC
    Windows 7 Professional
    Intel Core 2 Quad Q9500
    8 GB of RAM
    64-bit Operating System
    Photoshop CC 2014.2.1

    I updated my question to include additional info.
    The PDF saving process is the same. The PDF type, how it was saved, what it was created in, never used to make a difference - not sure why it would now? 
    I can open the file with Photoshop, just can't place it into a PSD. Photoshop does not have issues placing images and other assets. It only has an issue with PDFs.

  • Why Aperture doesn't send the RAW file to Photoshop

    I've seen the complaint about Aperture not passing the original RAW file to Photoshop in several places in this forum. I think I have a reason for why Aperture doesn't work this way.
    The reason has to do with the 1st law of digital RAW photography. "Never, ever, overwrite the original RAW data from a camera's RAW format file."
    Because of the above rule, both Aperture and Photoshop do not actually work on the original RAW file. They transform the RAW image data into a usable image using user specified settings (which may be the camera's default setting for that image). The original RAW file is left untouched.
    When you open a RAW file in Photoshop and try to save it, you'll be prompted for a new file name. You wouldn't want to overwrite the original RAW file by writing the edited image data back to it.
    When you edit an Aperture RAW file using Photoshop as the external editor, Aperture first creates a TIFF or PSD version image file in its library and then passes that file name to Photoshop. Photoshop opens the TIFF or PSD file and directly edits it. Since this version file is already in Aperture's library, when Photoshop is finished editing it, Aperture automatically sees the edited file because its already in the library.
    If Aperture were to send the RAW file name to Photoshop, Photoshop would open the RAW file and create a new PSD file. When it came time to save your edits, where would you save it. In order to get it back into Aperture's library, you would need some form of Photoshop to Aperture communication so that Photoshop would know where to save the edited file and Aperture would know to add it to the library. This would require collaboration between both Adobe and Apple and doesn't seem likely.
    I have a couple of ideas someone can try. These are only ideas and completely untested. I'd do it myself but I don't own Aperture (see my computer info below for the reason).
    1. Create two folders with automator actions. You export your RAW files from Aperture to a "Photoshop-IN" folder. Any new RAW image found in this folder will be automatically opened in Photoshop by the Automator action. Then you save the edited Photoshop file into a 2nd folder "Aperture-IN". Another Automator action imports this into Aperture.
    2. In iPhoto, if you try to edit a RAW image with an external editor, iPhoto creates an intermediate image file (JPEG I think) which it passes to Photoshop. But, if you drag the original RAW image thumbnail from iPhotos library window to the Photoshop icon in the dock, the original RAW image file is passed to Photoshop. You only have the problem of getting the saved Photoshop file back into iPhoto's library. Maybe this same thing would work in Aperture by dragging the Master image to the Photoshop icon in the dock.
    PowerMac G4 Dual 1.25GHz   Mac OS X (10.4.3)   FW800, 4 internal HD - 550GB

    This is all well and good. I wholeheartedly agree with the idea of keeping the "master" sacrosanct. What I object to is not being able to do the conversion in Photoshop (or elsewhere)
    What I want is for Aperture to send the raw over to photoshop when I select "open in external editor", and then follow the current workflow (I do my edits, hit save, and a second master is added to Aperture's db.)
    It's totally possible for them to do this, and it wouldn't break anything in the system, or the philosophy. Of course it's a workaround that wouldn't be necessary if Aperture's converter were up to snuff. But it isn't, and I bet it would be easier to implement the workaround than to fix the fundamental defects in the converter itself.

Maybe you are looking for