Batch Process: Add Alpha Mask From File

I did a search for this, but couldn't find anything.  If there is something, please feel free to send me in that direction.
I use Photoshop a lot for my 3D work.  Usually, when I render an image sequence out, I have the mask saved in the alpha channel.  Unfortunately, ZBrush doesn't allow me to do that, and instead saves the mask out as a separate image.  I need to add the alpha mask to the color plate file.  Is there any way to do this with batch processing?
--Andrew

AndrewRaz wrote:
Thank you for your response.  I guess for now, I'll just add the masks by hand, since I don't know scripting at all.
It would be worth asking in the Scripting forum. There may be something available, in which case you just copy the file into the appropriate folder in PS and it's there on the menu to use.
Scripting forum.

Similar Messages

  • In Photoshop Elements 12, is there a way to batch process all photos in a file with 'Auto Tone' and save the changes?

    In Photoshop Elements 12, is there a way to batch process all photos in a file with 'Auto Tone' and save the changes?

    Thank you, that was perfect!
    Yoni

  • Cannot deploy process flow package specification from file

    Hi,
    we are using owb 11gr2 on linux. We successfully managed to deploy mappings and tables into a specification file, and then deploy from that file into the target database (RAC). But when we try to deploy a process flow package we run into an error:
    A process flow package can be deployed to a specification file. But a deployment from that specification file fails with the error: " OMB05623: Cannot deploy specification from file. Exception follows. nulll"
    ### SETUP
    set CONN_DESIGN "xxx"
    set CONN_TARGET_DESIGN "yyy"
    set CONN_TARGET_RT "xxx'"
    set DIR "D:\\tmp"
    set RELEASE "V0_2"
    set file "$DIR\\$RELEASE"
    set plan "FILE_DEPLOY_$RELEASE"
    ### Deployment via control center: works!
    OMBCONNECT $CONN_DESIGN
    OMBCONNECT CONTROL_CENTER $CONN_TARGET_RT
    OMBCC '/KLINGEL_DWH'
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN '$plan'
    OMBALTER DEPLOYMENT_ACTION_PLAN '$plan' ADD ACTION 'PF_TEST' SET PROPERTIES (OPERATION) VALUES ('REPLACE') SET REFERENCE PROCESS_FLOW_PACKAGE '/KLINGEL_DWH/WF_DWH/PF_TEST'
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN '$plan'
    OMBDISCONNECT CONTROL_CENTER
    OMBCOMMIT
    OMBDISCONNECT
    ### Deployment via specificatin file: fails!
    OMBCONNECT $CONN_DESIGN
    OMBCONNECT CONTROL_CENTER $CONN_DESIGN
    OMBCC '/KLINGEL_DWH'
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN '$plan'
    OMBALTER DEPLOYMENT_ACTION_PLAN '$plan' ADD ACTION 'PF_TEST' SET PROPERTIES (OPERATION) VALUES ('REPLACE') SET REFERENCE PROCESS_FLOW_PACKAGE '/KLINGEL_DWH/WF_DWH/PF_TEST'
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN '$plan' AS SPECIFICATION TO '$file.xml'
    OMBDROP DEPLOYMENT_ACTION_PLAN '$plan'
    OMBDISCONNECT CONTROL_CENTER
    OMBCOMMIT
    OMBDISCONNECT
    OMBCONNECT CONTROL_CENTER $CONN_TARGET_RT
    OMBDEPLOY SPECIFICATION FROM '$file.xml'
    ### OMB05623: Deployment von Spezifikation aus Datei nicht möglich. Exception folgt. null
    ###OMB05623: Cannot deploy specification from file. Exception follows. nullIf we use the operation DROP it works. But REPLACE and CREATE do not work.
    We get the error regardless whether the code is executed as an expert or on the command line at a windows client.
    Does anyone knows a workaround?
    Deployment via a specification file is a must due to license and architecture requirements.
    Thanks,
    Carsten.

    Its woked fine for me for OWB 10.2.0.4 .... some steps are missing from code like
    when you are connecting again it should be
    OMBDISCONNECT
    OMBCONNECT CONTROL_CENTER $CONN_TARGET_RT
    OMBDISCONNECT
    OMBCC '/KLINGEL_DWH'
    OMBCONNECT CONTROL_CENTER $CONN_TARGET_RTI think you can try the same on different system .
    Cheers
    Nawneet

  • Batch Processing in Photoshop CS5 opens files in Camera Raw

    Regarding batch processing straight from Photoshop CS5 (not in Bridge) I am unable to get the .dng files to open up without requiring that I click on 'open image' in Camera Raw.  I am trying to run a simple two step sharpen plus save and close action on a batch of 700+ .dng files.  There is no open command in the action.  Thanks.

    You probably need to check Suppress File Open Options Dialogs.
    MTSTUNER

  • Batch processing - "Add comments" metadata?

    Greetings,
    Using Acrobat Pro while batch processing Word documents, is it possible to add a comment (all at once, to all the documents being processed) to the "properties" of each document?
    We review documents several times a year. I'd like to add a "review date" to each document's (metadata) "properties". I'd like to do this while batch processing so that the people actually reviewing the documents don't have to open each individual document's properties and add/change the date.
    The review date does not need to be visible on the document itself, but should be in the document's metadata.
    Thank you,
    Tim Kern

    It's possible to convert Word files to PDFs using an Action in Acrobat Pro, and Actions include limited abilities to alter the metadata (though to add a custom value you will need to manually rebuild the XMP data using a JavaScript function).

  • Acrobat 9 Batch Processing - Get PDF filenames from folder?

    Hello,
    Can anyone provide me with an example with how to use Batch Processing (when set to a specific folder/files) to get a list of filenames in that folder? I haven't been able to find any examples online. There doesn't seem to be any built in batch sequences that automatically do this so I assume it will need to be done with javascript?
    Ultimately, I need to automate a process (I was hoping to create a batch sequence to accomplish this) that will allow me to prompt a user to pick a source folder of PDFs and then based on that selection, run a Javascript that I create which will merge all PDFs in that folder into a new PDF, apply some crop setttings to each page, and then prompt the user where to save the merged PDF?
    Has anyone ever done anything like this? I would love to see an example of how this might be able to be achieved.
    Many thanks in advance.

    Have you tried to create a test batch process (now called Actions)?  Actions in Acrobat 10 has the "merge all files in folder" option, and batch processing in previous versions has always included a page crop commad as well as an option for asking the user where to save the file.
    There are lots of examples and articles on this topic at http://www.acrobatusers.com
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • PoswerShell - Compare 2 x CSV files, only if data matches in column 1 add all data from file 2 to file 1 or output collated results

    OK, 1st the background...
    I have been provided a list of users of a particular group.
    We needed to know what computers (or IP's) the users are connected to...
    So, using Shared Folders, I have exported a list of all users connected to H drives (everyone on the domain) and I need to match their computernames (or IP) to the specific list of users I have...
    That gives me 2 x CSV files. 1 x master list of users, I list of all users PC or IP names.
    I need to be able to match the usernames on the master list (File1) with the usernames on File2 and append the computernames and connected times to File1 omitting the usernames that are not required...
    This is to determine what PC's the user is logged into and what site their computers are at.
    I also need to capture if they are logged into more than one computer (info is contained in File2)
    File1 Example:
    User
    FirstName
    LastName
    ADSite
    HDriveLocation
    HDriveLocationTS
    Office2010FAT
    XY123456
    BOB
    BUILDER
    LONDON 
    \\SERVER\%USERNAME%
    \\SERVER\USERNAME
    TRUE
    ABC09876
    JIM
    INYCRICKET 
    CHICAGO 
    \\SERVER\USERNAME
    \\SERVER\USERNAME
    TRUE
    ADD11223 
    SALLY
    METLARRY
    TOKYO
    \\SERVER\USERNAME
    \\SERVER\USERNAME
    FALSE
    File2 Example:
    User
    Computer
     Connected
    Idle
    XY123456 
    192.168.1.216 
    3 days 06:13:18
    0:00:03
    XY123456
    192.168.1.254 
    1 day 01:21:30
    23:08:39
    WXY46810 
    PCNAMEXYZ  
    6:44:19
    0:00:05
    I have found a PS script which "might" do what I need it to, but I haven't been able to "tweak" it right - it's omitting the details from File2 - http://powergui.org/thread.jspa?threadID=19522
    Also I can't figure out how to collect multiple computernames (that users are logged into) from File 2 and add this to File1
    Working with Powershell, but happy to consider any other options (EG: Excel, Macros, VBS, etc)
    Here's what I have got so far: (PS)
    $File1 = Import-Csv "C:\Users.csv"
    $File2 = Import-Csv "C:\Shares.csv"
    $Output = @()
    ForEach ($Item in $File1)
    { $Result = $File2 | Where { $Item.User -eq $_.User }
    $Output += New-Object PSObject -Property @{
    USER = $Item.User
    FirstName = $Item.FirstName
    LastName = $Item.LastName
    ADSite = $Item.ADSite
    Computer = $_.Computer
    Connected = $_.Connected
    Idle = $_.Idle
    Office2010FAT = $Item.Office2010FAT
    HDriveLocation = $Item.Connected
    HDriveLocationTS = $Item.Idle
    $Output | Select User,FirstName,LastName,ADSite,Computer,Connected,Idle,Office2010FAT,HDriveLocation,HDriveLocationTS | Export-Csv C:\Users\a1033965\Desktop\result.csv -NoTypeInformation
    However, the output I'm getting is missing the results from File2 and I NEED multiple computers listed if a user is logged into them:
    Current Output:
    USER
    FirstName
    LastName
    ADSite
    Computer
    Connected
     Idle 
    Office2010FAT
     HDriveLocation
     HDriveLocationTS
    XY123456
    BOB
    BUILDER
    LONDON
    TRUE
    ABC09876
    JIM
    INYCRICKET
    CHICAGO
    TRUE
    ADD11223 
    SALLY
    METLARRY
    TOKYO
    TRUE
    (TRUE is actually in the right column, under Office2010FAT as it should be - just doesn't look like it as I post this)
    Any help with this would be much appreciated. Cheers

    Please verify that your files look exactly like this:
    #file1 format
    User,FirstName,LastName,ADSite,HDriveLocation,HDriveLocationTS,Office2010FAT
    XY123456,BOB,BUILDER,LONDON,\\SERVER\%USERNAME%,\\SERVER\USERNAME,TRUE
    ABC09876,JIM,INYCRICKET,CHICAGO,\\SERVER\USERNAME,\\SERVER\USERNAME,TRUE
    ADD11223,SALLY,METLARRY,TOKYO,\\SERVER\USERNAME,\\SERVER\USERNAME,FALSE
    #file2 format
    User,Computer,Connected,Idle
    XY123456,192.168.1.216,3 days 06:13:18,0:00:03
    XY123456,192.168.1.254,1 day 01:21:30,23:08:39
    WXY46810,PCNAMEXYZ,6:44:19,0:00:05
    ¯\_(ツ)_/¯

  • Add Spotlight Comment from file?

    As I understand the way the *Add Spotlight Comments* works, the input is the file (or set of files) to be modified, and the added comments can either come statically from the workflow, or as user input if the workflow permits *Show Action When Run*.
    I have a moderately ugly shell script that downloads and examines a succession of files and builds a description (just a few dozen words) that I want to add automatically to those comments. At the end of my script, I've downloaded the file, and stored the comments I want in a separate temp file.
    As far as I can see, Automator can't do this: I can't specify a file as the incoming source of those new Spotlight Comments, can I?
    Assuming the answer is negative, two quick non-Automator followups:
    1) Is there any shell-script level Unix command that can manipulate the comments (without trying to hack into the .DS_Store files, that is).
    2) Can Applescript do this? And, crucially, where's the best current help for Applescript for someone that hasn't touched it in many years?

    Automator can do it, although some of the actions may not be obvious. Text (for example, the results of your ugly shell script) can be placed into a variable for later use, but you can also get it from a file. If your description/comment is in a plain text file, you can use the Combine Text Files action to get the text, then place it in a variable that can be used with the Set Spotlight Comments for Finder Items action.
    Example:
    1) Get Specified Finder Items (add your description file) (ignore input)
    2) Combine Text Files
    3) Set Value of Variable {Variable: whatever}
    4) Get Specified Finder Items (add the file you want to comment) (ignore input)
    5) Set Spotlight Comments for Finder Items {drag variable whatever to the text field, Append to existing comments}

  • How to batch process (color correct) multiple MXF files?

    Newb here with a question I cannot find an answer for. I'm very new to CS5.5 and am very frustrated with something that should be a simple procedure, at least it was with my last NLE.
    I am shooting amateur hockey games using a Canon XF100. Typically I shoot at 720 60p and with all the starts and stops of the game there may be 30-40 MFX files for a game. I'm having no problems importing into CS5.5, the files all show up on the timeline.
    I want (need) to be able to color correct ALL these files at once using the fast color corrector and/or the 3 way color balance. For the life of me I cannot seem to do this and I cannot find any answers despite many hours of searches.
    Last night I did (after much mucking around) manage to 'nest' the files and do the color correction but when I went to export to Media Encoder (to render as MP4 file) I kept getting error messages and was unable to proceed. This happened 6 times, the encoding would start and then after about 20 minutes, and some progress, it would give me an error message.
    Can someone please, pretty please!, explain a simpler way to do this? I feel like I am missing a very obvious step and I'm probably just phrasing the question incorrectly.
    Many thanks in advance.
    Dave
    Adobe CS5.5, Windows 7 Premium
    Intel i7
    9 GB Ram
    500 GB Velociraptor HDD
    Dual 27" monitors

    Unfortunately, you're doing it exactly in the right way. I just nested a sequence and applied the Fast Color Corrector to the nest and it exported beautifully. Could you try nesting and color correcting a short sequence with clips other than the MXF files generated by the Canon XF100 using the same methodology? I'm trying to see if it's your footage is the issue or something else.

  • How to reduce file size when using batch processing?

    I use File > Process Multiple Files to batch process photos to a smaller file size along with adding my watermark.  I've played with many different settings and no matter what I choose, I can't get my average file size to be less than about 200k.  However, when I've exported the same photos using iPhoto, I can get the file size to about half of that with no difference (to my naked eye at least) in quality.
    I definitely want to keep the height at 768 pixels so that needs to stay constant.
    My current settings in batch processing (average file size = 200 kb)
    Resize images with a height constraint of 768 pixels at 150dpi
    What I've tried:
    Resize at 72dpi (reduced file size by about 5kb)
    convert file to JPEG low quality (reduced file size by about 10kb)
    convert file to JPEG medium quality (not much difference in file size)
    I'm using PSE 10 on a Mac running Lion.
    Thank you in advance for your help!

    You should go with default settings of Optimizer.
    One difference between default settings of Optimizer and Reduce file size is that Optimizer does not guarantee a reduction in file size (if your Optimizer settings lead to an increase in file size, that's what you will get).
    With Acrobat 9, the default setting in Optimizer has an additional setting which would not do an image optimization that results in increase of file size. In that sense it would in most cases give a smaller file.

  • Batch Processing to Rename Files

    I use batch processing to rename file in Photoshop Elements 5.0. I renamed my files with the MRW extension and the extension was changed to PSD.
    I also tried batch processing to turn the MRW file into RAW files. I was able to do that but then Photoshop Elements was not able to open the newly renamed RAW files.
    Any suggestions on what I might be doing wrong?
    Bill

    You cannot make changes to your actual raw files. You must convert them to another format to do this, which is what PE is doing. The kind of RAW files PE/PS can read or create without going through ACR (the camera raw plugin window) are not camera raw files, but photoshop raw files, a very old PS format that is not good for much these days.

  • Help with batch processing

    Hi, I am having trouble with batch processing. I want to apply adaptive noise reduction (ANR) to several files from the same source tapes. So, following the help instructions, I create a script from one file. When I try to apply it to the other files, instead of applying ANR to them, it simply saves them as is. The steps I perform are as follows:
    I select the entire wave (I have also tried it without first selecting)
    I open the scripts box in the file menu
    I click on open/new script collection and create a new script
    I title the new script
    I click 'record'
    I close the scripts box
    I run ANR on the file
    I go back to the scripts box and click 'stop current script'
    I click add to collection
    I close the scripts box
    I open the batch processing box
    I select the files, then the script, then I click to start processing
    When I try to apply this to script to other files, it saves them but doesn't apply ANR.
    Can anyone suggest what I am doing wrong? Also, in the scripts box, there are three options for the type of script that I can create. One is highlighted: 'Scripts start from scratch.' Is that the correct one to use? If not, how do I select one of the others? I click on them but nothing happens. Finally, when creating a script, do I save the file before or after clicking 'stop record'? I have tried it both ways but don't know which is correct (neither seems to make a difference).
    Just to be as thorough as possible, below is the text of one of my scripts, in case that contains any clues. Thanks so much for any and all help!!
    Collection: doubletnr
    Title: d2
    Description:
    Mode: 2
    Undo: 0
    Selected: none at 0 scaled 109479495 SR 44100
    Freq: Off
    cmd: Channel Both
    Selected: 0 to 109479494 scaled 109479495 SR 44100
    Freq: Off
    Comment: Restoration\Adaptive Noise Reduction
    cmd: {EA93BBBE-0B8F-47D6-AC6D-B67B46524E41}
    1: 52,AAA€ÛÚZ€AAQ€ãýÇÛÚÚAAA€Ďč¸āĂ}úƒÓ~ip€k•iëåÁëåÁ
    2:
    3: 13
    4: 0
    5: 0
    6: 3190728
    7: 0
    8: 0
    9: 0
    10: 1
    Freq: Off
    End:

    This is what my script looks like. Although I was worried about the strange characters in the script, it does work.
    Make sure that the script you use is suitable for the sample rate and bit depth of the file. E.g. if you have 44100/32-bit files, then don't use a script that was recorded on a file with e.g. 48000/16-bit. If required, resample or make different scripts for different rates/depths.
    Collection: Test ANR AA Forum
    Title: Test ANR AA Forum
    Description:
    Mode: 4
    Undo: 1
    Selected: 0 to 9233563 scaled 9233563 SR 44100
    Freq: Off
    cmd: Channel Both
    Selected: 0 to 9233563 scaled 9233563 SR 44100
    Freq: Off
    Comment: Restoration\Adaptive Noise Reduction
    cmd: {EA93BBBE-0B8F-47D6-AC6D-B67B46524E41}
    1: 52,AAA€ÛÚZ€AAQ€ãýÇÛÚÚAAA€Ďč¸āĂ}úƒÓ~ip€k•iëåÁëåÁ
    2:
    3: 13
    4: 0
    5: 0
    6: 154705552
    7: 0
    8: 0
    9: 0
    10: 1
    Freq: Off
    End:

  • Batch Process Export As and Save As JPEG Question?

    What is the method for creating scaled JPEGs from PNG files with batch processing (File | Batch Process...)?
    Application environment: Fireworks CS4.
    Using History panel, I manually captured instructions
    Modify | Transform | Numeric Transform (13%)
    Modify | Canvas | Fit Canvas
    File | Save As (JPEG)
    History panel's saved JavaScript file script:
    fw.getDocumentDOM().scaleSelection(0.11999999731779099, 0.11999999731779099, "autoTrimImages transformAttributes");
    fw.getDocumentDOM().setDocumentCanvasSizeToDocumentExtents(true);
    fw.saveDocumentAs(null, true);
    Running this sequence as a batch job requires manually selecting JPEG and "okaying"
    CS4 documentation for saveDocumentAs is defined with different argument list: fw.saveDocumentAs(document) .  CS4 documentation also has: fw.exportDocumentAs(document, fileURL, exportOptions) to export JPEG (80% quality).  CS4 feature File | Image Preview... | Export does not create a history record for guidance.  I cannot find an example of either instruction save a file to a local folder in JPEG format.  My objective is to add an additional batch step Rename (prefix) for the JPEG output, and script this a a batch process.

    Joyce,
    Thank you.  Your suggestion helped clear my mental log jam.
    Fireworks batch scripting seems to work in reverse.
    Using "Batch Process..." scripting interface 'Export' (as JPEG) option first, 'Rename' (add Prefix) option second, and then follow these by using the history panel's 2 previously saved steps (Numeric Transform, Fit Canvas), batch process now works.  PNG file (list) is saved in targeted folder as a reduced scale JPEG with a prefixed file name.
    Batch Process allows the entire newly defined command sequence to be saved (script.js).  Placing this (renamed) file into Firework's batch look-up directory for scripts (C:\Documents and Settings\account_name\Application Data\Adobe\Fireworks CS4\Commands) does not work.  The file name does not display in "Batch Process" window "Batch options:" Commands drop-down list.
    Batch Process only works by recreating the above steps each use.
    The new (JavaScript) file is 26 KB.  Is script file size limited in Fireworks "Batch options:" feature?

  • Batch process RAW exposures, please help!

    Hello, I'm new to photoshop scripting for windows, and I was wondering if anyone knew how to batch process a folder of raw files, change the the raw's exposure, and save as jpg to another folder, based on a condition within the file's name, then close the opended jpg  document.
    My goal is to have a script that extracts the correct exposures from sets of three bracketed raw files, which I usually have seperated by 2 EV's.  So for example, say I have a folder Called Batch Processing on the C drive, and I have two folders,
    C:\Batch Processing\JPG
    C:\Batch Processing\RAW
    and in the RAW folder I have some files called,
    Image_01_E01.cr2
    Image_01_E02.cr2
    Image_01_E03.cr2
    If the file has "_E01" at the end, I want to open that raw file, change the exposure to -4, save the file with the same name, except the last 4 characters, and add some number to the end, so for example, it would end up being "Image_01" + "_E01".  This would end up being saved to the JPG folder. Then open up the same file, change the exposure to -2 and save as "Image_01" + "_E02".
    To make this post short, here is the conversion table I'm trying to achieve -
    Image_01_E01.cr2 -> Image_01_E01.jpg Exposure = -4
    Image_01_E01.cr2 -> Image_01_E02.jpg Exposure = -2
    Image_01_E02.cr2 -> Image_01_E03.jpg Exposure = -2
    Image_01_E02.cr2 -> Image_01_E04.jpg Exposure = 0
    Image_01_E02.cr2 -> Image_01_E05.jpg Exposure = 2
    Image_01_E03.cr2 -> Image_01_E06.jpg Exposure = 2
    Image_01_E03.cr2 -> Image_01_E07.jpg Exposure = 4
    After that, close all open files. Then, if there is another set of raws, repeat for them as well. For example -
    Image_02_E01.cr2 -> Image_02_E01.jpg Exposure = -4
    Image_02_E01.cr2 -> Image_02_E02.jpg Exposure = -2
    Image_02_E02.cr2 -> Image_02_E03.jpg Exposure = -2
    Image_02_E02.cr2 -> Image_02_E04.jpg Exposure = 0
    Image_02_E02.cr2 -> Image_02_E05.jpg Exposure = 2
    Image_02_E03.cr2 -> Image_02_E06.jpg Exposure = 2
    Image_02_E03.cr2 -> Image_02_E07.jpg Exposure = 4
    So basically this script would take 3 raws seperated by 2 EV's and extract 7 exposures, seperated by 2 EV's.  I've done this manually, and merged them to hdr, and the results are actually pretty decent. 
    I tried doing this with actions and batch processing, but I had to have everything seperated in individual folders like E01, E02, etc. and I had to make an action for each step in the process.
    I know this is probably a lot to ask, but I think it can be done, and I would of course credit the person in the script for helping.
    Thanks in advance!

    I think I was able to make a function to get the exposure time from the raw's xmp file. So the xmp file has to already be saved with the exposure time in the exif section.
    function getEV(thumb){
        var Name = decodeURI(thumb.name).replace(/\.[^\.]+$/, '');
        var file = new File(thumb.path + "/" + Name + ".xmp");
        try{
            if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
            if(file.exists){
                file.open('r');
                file.encoding = "UTF8";
                file.lineFeed = "unix";
                file.open("r", "TEXT", "????");
                var xmpStr = file.read();
                file.close();
            }else{
                var xmpStr='';
            var xmp = new XMPMeta( xmpStr );
            var exposureTime = xmp.getProperty(XMPConst.NS_EXIF, 'ExposureTime');
            if(exposureTime  == undefined) exposureTime = 1;
        }catch(e){alert(e+"-"+e.line);}
        return exposureTime;
    I was able to use the ui you put together from your hdr script, and used the functions from your cr2 script, to make the raw converter script. I've added a drop down list for the different conversion, and I added an option to either enter the exposure time for the middle exposure, or use the xmp's exposure time instead. So far I've only added a straight conversion method, where the files are converted, without any modifications, the 3 raw, and 5 raw conversion methods. Here's the script -
    #target photoshop
    app.bringToFront();
    main();
    function main(){
        Prefs = {};
        try{
            var desc1 = app.getCustomOptions('0bafbed0-0bc7-11e1-be50-0800200c9a66');
            Prefs = eval(desc1.getString(0));
        }catch(e){
            Prefs.folder1 = Folder("~/desktop");
            Prefs.folder2 = Folder("~/desktop");
            Prefs.bits = false;
        var win = new Window( 'dialog', 'RAW Converter' );
        g = win.graphics;
        var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.91, 0.91, 0.91, 1]);
        g.backgroundColor = myBrush;
        win.orientation = 'row';
        win.p1 = win.add("panel", undefined, undefined, {borderStyle:"etched"});
        win.g1 = win.p1.add('group');
        win.g1.orientation = "row";
        win.title = win.g1.add('statictext',undefined,'RAW to JPEG Converter');
        win.title.alignment = "fill";
        var g = win.title.graphics;
        g.font = ScriptUI.newFont("Georgia","BOLDITALIC",22);
        win.g5 = win.p1.add('group');
        win.g5.orientation = "row";
        win.g5.alignment = 'left';
        win.g5.spacing = 10;
        win.g5.st1 = win.g5.add('statictext',undefined,'Please select input folder');
        win.g10 = win.p1.add('group');
        win.g10.orientation = "row";
        win.g10.alignment = 'left';
        win.g10.spacing = 10;
        win.g10.et1 = win.g10.add('edittext');
        win.g10.et1.preferredSize = [400,20];
        win.g10.et1.enabled = false;
        win.g10.bu1 = win.g10.add('button',undefined,'Browse');
        win.g10.bu1.onClick = function() {
            InputFolder = Folder.selectDialog("Input folder",Prefs.folder1);
            if(InputFolder != null){
                win.g10.et1.text = decodeURI(InputFolder.fsName);
                processHDRList();
        win.g15 = win.p1.add('group');
        win.g15.orientation = "row";
        win.g15.alignment = 'left';
        win.g15.spacing = 10;
        win.g15.st1 = win.g15.add('statictext',undefined,'Please select output folder');
        win.g20 = win.p1.add('group');
        win.g20.orientation = "row";
        win.g20.alignment = 'left';
        win.g20.spacing = 10;
        win.g20.et1 = win.g20.add('edittext');
        win.g20.et1.preferredSize = [400,20];
        win.g20.et1.enabled = false;
        win.g20.bu1 = win.g20.add('button',undefined,'Browse');
        win.g20.bu1.onClick = function() {
            OutputFolder = Folder.selectDialog("Output folder",Prefs.folder2);
            if(OutputFolder != null){
                win.g20.et1.text = decodeURI(OutputFolder.fsName);
        win.g30 = win.p1.add('group');
        win.g30.orientation = "row";
        win.g30.alignment = 'right';
        win.g30.spacing = 10;
        win.g30.st1 = win.g30.add('statictext',undefined,'Please select conversion method');
        win.g30.dd1 = win.g30.add('dropdownlist');
        win.g30.dd1.preferredSize = [200,20];
        var ConversionList = [];
        ConversionList[0] = "Straight Conversion";
        ConversionList[1] = "Bracketed 3x2EV to 7x2EV";
        ConversionList[2] = "Bracketed 5x2EV to 9x2EV";
        for(var x in ConversionList){
            win.g30.dd1.add('item', ConversionList[x].toString());
        win.g30.dd1.selection = 0;
        var ConversionSel = win.g30.dd1.selection.text.toString();
        win.g40 = win.p1.add('group');
        win.g40.orientation = "row";
        win.g40.alignment = 'right';
        win.g40.spacing = 10;
        win.g40.st2 = win.g40.add('statictext',undefined,'Please enter the exif exposure time of middle exposure');
        win.g40.et1 = win.g40.add('edittext',undefined,'1');
        win.g40.et1.preferredSize=[80,20];
        win.g40.et1.enabled = true;
        var TVsel = win.g40.et1.text.toString();
        win.g50 = win.p1.add('group');
        win.g50.orientation = "row";
        win.g50.alignment = 'right';
        win.g50.spacing = 10;
        win.g50.cb1 = win.g50.add('checkbox',undefined,'Use XMP exposure time instead');
        win.g50.cb1.helpTip = "Uses the xmp file's exposure time for the middle exposure instead";
        win.g300 = win.p1.add('group');
        win.g300.orientation = "row";
        win.g300.alignment = 'center';
        win.g300.spacing = 10;
        win.g300.bu1 = win.g300.add('button',undefined,'Process');
        win.g300.bu1.preferredSize = [240,30];
        win.g300.bu2 = win.g300.add('button',undefined,'Cancel');
        win.g300.bu2.preferredSize = [240,30];
        win.g300.bu1.onClick = function(){
            if(win.g10.et1.text == ''){
                alert("Input folder has not been selected!");
                return
            if(win.g20.et1.text == ''){
                alert("Output folder has not been selected!");
                return
            try{
            Prefs.folder1 = InputFolder;
            Prefs.folder2 = OutputFolder;
            var progressBar = function(title) {
                var w = new Window( 'palette', ' '+title, {x:0, y:0, width:340, height:60} ),
                pb = w.add( 'progressbar', {x:20, y:12, width:300, height:12}, 0, 100 ),
                st = w.add( 'statictext', {x:10, y:36, width:320, height:20}, '' );
                st.justify = 'center';
                w.center();
                this.reset = function( msg,maxValue ) {
                    st.text = msg;
                    pb.value = 0;
                    pb.maxvalue = maxValue||0;
                    pb.visible = !!maxValue;
                    w.show();
                this.hit = function() { ++pb.value; };
                this.hide = function() { w.hide(); };
                this.close = function() { w.close(); };
                this.show = function() { w.show(); };
                this.update = function() { w.update(); };
                this.layout = function() { w.layout.layout(); };
            function doPbar(){
                pBar.hit();
                pBar.hide();
                pBar.show();
            var count = 0;
            var group0 = InputFolder.getFiles(/\.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|srf| sr2)$/i);
            var group1 = InputFolder.getFiles(/\e01.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|s rf|sr2)$/i);
            var group2 = InputFolder.getFiles(/\e02.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|s rf|sr2)$/i);
            var group3 = InputFolder.getFiles(/\e03.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|s rf|sr2)$/i);
            var group4 = InputFolder.getFiles(/\e04.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|s rf|sr2)$/i);
            var group5 = InputFolder.getFiles(/\e05.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|s rf|sr2)$/i);
            count += group0.length;
            count += group1.length;
            count += group2.length;
            count += group3.length;
            count += group4.length;
            count += group5.length;
            if (count <1) return;
            if (win.g30.dd1.selection == 0) {
                var pBar = new progressBar("RAW to JPEG Straight Conversion");
                pBar.reset("Processing Files", (group1.length*2));
                for(var a in group0){
                    setEV(group0[a],0);
                    open(group0[a]);
                    var Name = decodeURI(group0[a].name).replace(/\.[^\.]+$/, '');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group0[a]);
                    var exportFile = new File( OutputFolder + "/" + Name + ".jpg" );
                    SaveForWeb(exportFile,100);
                    doPbar();
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,TVval,0);
                pBar.close();
            } else
            if (win.g30.dd1.selection == 1) {
                var pBar = new progressBar("3 RAWs by 2 EV to 7 JPEGs by 2 EV");
                pBar.reset("Processing E01 Files", (group1.length*2));
                for(var a in group1){
                    setEV(group1[a],-4);
                    open(group1[a]);
                    var Name = decodeURI(group1[a].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e01$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group2[a]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E01.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/64"),-6);
                    doPbar();
                    setEV(group1[a],-2);
                    open(group1[a]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E02.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/16"),-4);
                    doPbar();
                pBar.reset("Processing E02 Files", (group2.length*3));
                for(var b in group2){
                    setEV(group2[b],-2);
                    open(group2[b]);
                    var Name = decodeURI(group2[b].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e02$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group2[b]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E03.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/4"),-2);
                    doPbar();
                    setEV(group2[b],0);
                    open(group2[b]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E04.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,TVval,0);
                    doPbar();
                    setEV(group2[b],2);
                    open(group2[b]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E05.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"4"),2);
                    doPbar();
                pBar.reset("Processing E03 Files", (group3.length*2));
                for(var c in group3){
                    setEV(group3[c],2);
                    open(group3[c]);
                    var Name = decodeURI(group3[c].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e03$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group2[c]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E06.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"16"),4);
                    doPbar();
                    setEV(group3[c],4);
                    open(group3[c]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E07.jpg" );
                    SaveForWeb(exportFile,100);
                    doPbar();
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"64"),6);
                pBar.close();
            } else
            if (win.g30.dd1.selection == 2) {
                var pBar = new progressBar("5 RAWs by 2 EV to 9 JPEGs by 2 EV");
                pBar.reset("Processing E01 Files", (group1.length*2));
                for(var a in group1){
                    setEV(group1[a],-4);
                    open(group1[a]);
                    var Name = decodeURI(group1[a].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e01$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group3[a]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E01.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/256"),-8);
                    doPbar();
                pBar.reset("Processing E02 Files", (group2.length*3));
                for(var b in group2){
                    setEV(group2[b],-4);
                    open(group2[b]);
                    var Name = decodeURI(group2[b].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e02$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group3[b]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E02.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/64"),-6);
                    doPbar();
                    setEV(group2[b],-2);
                    open(group2[b]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E03.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/16"),-4);
                    doPbar();
                pBar.reset("Processing E03 Files", (group3.length*3));
                for(var c in group3){
                    setEV(group3[c],-2);
                    open(group3[c]);
                    var Name = decodeURI(group3[c].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e03$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group3[c]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E04.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/4"),-2);
                    doPbar();
                    setEV(group3[c],0);
                    open(group3[c]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E05.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,TVval,0);
                    doPbar();
                    setEV(group3[c],2);
                    open(group3[c]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E06.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"4"),2);
                    doPbar();
                pBar.reset("Processing E04 Files", (group4.length*3));
                for(var d in group4){
                    setEV(group4[d],2);
                    open(group4[d]);
                    var Name = decodeURI(group4[d].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e04$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group3[d]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E07.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"16"),4);
                    doPbar();
                    setEV(group4[d],4);
                    open(group4[d]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E08.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"64"),6);
                    doPbar();
                pBar.reset("Processing E05 Files", (group3.length*2));
                for(var e in group5){
                    setEV(group5[e],4);
                    open(group5[e]);
                    var Name = decodeURI(group5[e].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e05$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group3[e]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E09.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"256"),8);
                    doPbar();
                pBar.close();
            var desc2 = new ActionDescriptor();
            desc2.putString(0, Prefs.toSource());
            app.putCustomOptions('0bafbed0-0bc7-11e1-be50-0800200c9a66', desc2, true );
            win.close(0);
            }catch(e){alert(e + " - " +e.line);}
        win.center();
        win.show();
        app.displayDialogs = DialogModes.NO;
    function ExifEV(Input,Multiplier) {
        var EVval = Math.abs(eval(Input)*eval(Multiplier)); // Positive Decimal
        var EVvalN = 1; // Numerator
        var EVvalD = 1; // Denominator
        if (EVval < 0.5) EVvalD = Math.floor(1/EVval); else // For values less than 1/2
        // For values greater than 1/2 or values less than 1-1/2, returns 1000ths
        if (EVval < 1 || EVval > 1) {
            EVvalN = Math.floor(EVval*1000);
            EVvalD = 1000;
        } else                                   
        if (EVval > 1.5) EVvalN = Math.floor(EVval); // For values greater than 1-1/2
        return String(EVvalN + "/" + EVvalD); // Return fraction
    function getEV(thumb){
        var Name = decodeURI(thumb.name).replace(/\.[^\.]+$/, '');
        var file = new File(thumb.path + "/" + Name + ".xmp");
        try{
            if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
            if(file.exists){
                file.open('r');
                file.encoding = "UTF8";
                file.lineFeed = "unix";
                file.open("r", "TEXT", "????");
                var xmpStr = file.read();
                file.close();
            }else{
                var xmpStr='';
            var xmp = new XMPMeta( xmpStr );
            var exposureTime = xmp.getProperty(XMPConst.NS_EXIF, 'ExposureTime');
            if(exposureTime  == undefined) exposureTime = 1;
        }catch(e){alert(e+"-"+e.line);}
        return exposureTime;
    function setEV(thumb,evValue){
        var Name = decodeURI(thumb.name).replace(/\.[^\.]+$/, '');
        var file = new File(thumb.path + "/" + Name + ".xmp");
        try{
            if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
            if(file.exists){
                file.open('r');
                file.encoding = "UTF8";
                file.lineFeed = "unix";
                file.open("r", "TEXT", "????");
                var xmpStr = file.read();
                file.close();
            }else{
                var xmpStr='';
            var xmp = new XMPMeta( xmpStr );
            var exposureValue = xmp.getProperty(XMPConst.NS_CAMERA_RAW, "Exposure");
            xmp.deleteProperty(XMPConst.NS_CAMERA_RAW, "Exposure");
            xmp.setProperty(XMPConst.NS_CAMERA_RAW, "Exposure",Number(evValue));
            file.open('w');
            file.encoding = "UTF8";
            file.lineFeed = "unix";
            file.write( xmp.serialize() );
            file.close();
            if(exposureValue  == undefined) exposureValue = 0;
        }catch(e){alert(e+"-"+e.line);}
        return exposureValue;
    function putXMPData(fileName,exposureTime,evValue){
        if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
        var xmpf = new XMPFile(fileName.fsName, XMPConst.FILE_UNKNOWN, XMPConst.OPEN_FOR_UPDATE | XMPConst.OPEN_USE_SMART_HANDLER );
        var xmp = xmpf.getXMP();
        try{
            xmp.setProperty(XMPConst.NS_TIFF, 'Make', 'Canon');
            xmp.setProperty(XMPConst.NS_TIFF, 'Model', 'Canon EOS REBEL T1i');
            xmp.setProperty(XMPConst.NS_EXIF, 'ExposureTime', exposureTime);
            xmp.setProperty(XMPConst.NS_EXIF, 'FNumber', '63/10');
            xmp.setProperty(XMPConst.NS_CAMERA_RAW, 'Exposure',Number(evValue));
            if (xmpf.canPutXMP(xmp)) {
                    xmpf.putXMP(xmp);
                }else{
                    alert(e.message);
                xmpf.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
        }catch(e){}
    function SaveForWeb(saveFile,jpegQuality) {
        var sfwOptions = new ExportOptionsSaveForWeb();
        sfwOptions.format = SaveDocumentType.JPEG;
        sfwOptions.includeProfile = false;
        sfwOptions.interlaced = 0;
        sfwOptions.optimized = true;
        sfwOptions.quality = jpegQuality;
        activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions);
    The script seems to work decent, so I plan on adding the other conversions I mentioned earlier, to it.  If there is a way of getting the exposure time directly from the raw file, please let me know.

  • Acrobat 9.4.4 crashes when running batch process to remove metadata

    I am attempting to run a batch process to remove metadata from all documents within a folder. Only one or two documents will process before Acrobat crashes. Any suggestions?
    Thank you.

    There may be a corrupted video or image file on your iPad.
    Try to download from the iPad using Image Capture instead and save the photos to a folder. If that succeeds, you can check the files for corruption before importing them to iPhoto.

Maybe you are looking for