Play an action on a batch of files

This question was posted in response to the following article: http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-62a7a .html

you record an action, eg, to resize an image...
then, you go to File>Automate> batch...... choose the action, and set up the source folder options, destination options etc.
and then run it. If you have save actions recorded you can apply those instead of the batch save as settings.
G

Similar Messages

  • Batch of files manually sorted in Bridge - Can I run a PS Action in that manual order?

    For some jobs my workflow ideally involves manually sorting the order of a batch of RAW files in Bridge (the RAW file names are as assigned by the camera) and then using a PS Action from Bridge to convert, save, and rename the batch of files. I want to end up with my image files sequentially numbered in the manually sorted order.
    However, my PS Action automatically processes the files in ascending order of their RAW file names and therefore my manually assigned file order in Bridge is lost.
    Is there a script (or other method) which will allow me to run a PS action from Bridge on a batch of files while keeping the manually sorted order for the purposes of the numbering sequence of the renamed output files?
    My current workaround is to Batch Rename in Bridge a copied set of RAW files as an intermediate step to running my PS Action on the renamed RAW file copies. It's not a bad workaround but if there is an easier way, I would much appreciate knowing about it!
    Geoff

    Geoff, here is an example that works for me. When I test ran the sample script based on some stuff that I do the files are process in the order of the manual sort and only the files in my selection are processed folders etc are ignored… I have NO idea how much people charge for this sort of thing I only do it for the learning process. If you can let me know what the Photoshop process is and your OS I 'may' be able to help but I make NO promises as Im still very much the learner with this stuff…
    You can give this a test if you like…
    #target bridge
    with (app.document) {
         if (sorts[0].type == 'user') {
              if (selections.length == 0) {
                   selectAll();
                   var userSel = selections;
                   deselectAll();
              } else {
                   var userSel = selections;
              for (var i = 0; i < userSel.length; i++) {
                   if (userSel[i].type == 'file') psProcess(userSel[i].spec);
         } else {
               alert('This window is NOT a manual sort?')
    function psProcess(filePath) {
         var psScript = 'while (app.documents.length) app.activeDocument.close(SaveOptions.PROMPTTOSAVECHANGES);' + '\n';
         psScript += 'var userDialogs = app.displayDialogs; \n';
         psScript += 'var userRulerUnits = app.preferences.rulerUnits; \n';
         psScript += 'app.diaplayDialogs = DialogModes.NO; \n';
         psScript += 'app.preferences.rulerUnits = Units.PIXELS; \n';
         psScript += 'app.bringToFront(); \n';
         // Pass File Object as toSource
         psScript += 'var thisFile = ' + filePath.toSource() + '; \n';
         psScript += 'var docRef = app.open(thisFile); \n';
         psScript += 'var baseName = docRef.name.slice(0, -4); \n';
         // Edit the document
         psScript += 'if (docRef.bitsPerChannel == BitsPerChannelType.SIXTEEN) docRef.bitsPerChannel = BitsPerChannelType.EIGHT; \n';
         psScript += 'if (docRef.mode != DocumentMode.RGB) docRef.changeMode(ChangeMode.RGB); \n';
         psScript += 'if (docRef.colorProfileName != "sRGB IEC61966-2.1") docRef.convertProfile("sRGB IEC61966-2.1", Intent.RELATIVECOLORIMETRIC); \n';
         psScript += 'docRef.flatten(); \n';
         // Call some functions
         psScript += 'processChannels(docRef); \n';
         psScript += 'processPaths(docRef); \n';
         psScript += 'if (docRef.pathItems.length >= 1) processSelection(docRef, 0); \n';
         psScript += 'fitImage(docRef, 880, 72); \n';     
         psScript += 'docRef.resizeCanvas(900, 900, AnchorPosition.MIDDLECENTER); \n';
         // set up new file path to save document
         psScript += 'var newFilePath = new File("~/Desktop/" + baseName + ".jpg"); \n';
         psScript += 'saveFileasJPEG(newFilePath, 9); \n';
         //      Close doc & put back prefs
         psScript += 'app.activeDocument.close(SaveOptions.DONOTSAVECHANGES); \n';
         psScript += 'app.diaplayDialogs = userDialogs; \n';
         psScript += 'app.preferences.rulerUnits = userRulerUnits; \n';     
         // Use eval & toSource for Photoshop functions
         psScript += 'eval' + processChannels.toSource(); + '; \n';
         psScript += 'eval' + processPaths.toSource(); + '; \n';
         psScript += 'eval' + processSelection.toSource(); + '; \n';
         psScript += 'eval' + fitImage.toSource(); + '; \n';
         //psScript += 'eval' + imageArea.toSource(); + '; \n';
         //psScript += 'eval' + saveFileasTIFF.toSource(); + '; \n';
         psScript += 'eval' + saveFileasJPEG.toSource(); + '; \n';
         // Send script to Photoshop
         btMessaging('photoshop', psScript);
    General Functions
    function btMessaging(targetApp, script) {
         var bt = new BridgeTalk();
         bt.target = targetApp;
         bt.body = script;
         bt.send();
    function createFolder(folderPath) {
         var thisFolder = new Folder(folderPath);
         if (!thisFolder.exists) thisFolder.create();
    Photoshop Functions
    function processChannels(docRef) {
         for (var i = docRef.channels.length-1; i >= 0; i--) {
              if (docRef.channels[i].kind == ChannelType.MASKEDAREA) {
                   docRef.channels[i].remove();
                   continue;
              if (docRef.channels[i].kind == ChannelType.SELECTEDAREA) {
                   docRef.channels[i].remove();
                   continue;
              if (docRef.channels[i].kind == ChannelType.SPOTCOLOR) {
                   docRef.channels[i].merge();
    function processPaths(docRef) {
         if (docRef.pathItems.length >= 2) {
              for (var i = 0; i < docRef.pathItems.length; i++) {
                   if (docRef.pathItems[i].kind == PathKind.CLIPPINGPATH) {
                        docRef.pathItems[i].makeClippingPath(0.5);
                        docRef.pathItems[i].makeSelection(0, true, SelectionType.REPLACE);
                        docRef.pathItems[i].deselect();
      if (docRef.pathItems.length == 1) {
              if      (docRef.pathItems[0].kind == PathKind.WORKPATH) docRef.pathItems[0].name = 'Clipping Path'
              docRef.pathItems[0].makeClippingPath(0.5);
              docRef.pathItems[0].makeSelection(0, true, SelectionType.REPLACE);
              docRef.pathItems[0].deselect();
    function processSelection(docRef, offSet) {
         if (docRef.layers[0].isBackgroundLayer) docRef.layers[0].isBackgroundLayer = false;
         docRef.selection.expand(offSet);
         docRef.selection.invert();
         docRef.activeLayer = docRef.layers[0];
         docRef.selection.clear();
         docRef.selection.deselect();
         docRef.trim(TrimType.TRANSPARENT, true, true, true, true);
         docRef.flatten();
    function fitImage(docRef, newSize, newRes) {
      if (docRef.width >= docRef.height) {
         docRef.resizeImage(newSize, undefined, newRes, ResampleMethod.BICUBICSMOOTHER);
      else {
         docRef.resizeImage(undefined, newSize, newRes, ResampleMethod.BICUBICSMOOTHER);
    function imageArea(docRef, newArea, newRes) {
      var originalArea = docRef.width * docRef.height;
      if (originalArea > newArea) {
         var newWidth = Math.sqrt(docRef.width * newArea / docRef.height);
         var newHeight = (docRef.height * newWidth / docRef.width);
         docRef.resizeImage(newWidth, newHeight, newRes, ResampleMethod.BICUBICSMOOTHER);
      else {
         docRef.resizeImage(undefined, undefined, newRes, ResampleMethod.NONE);
    function bitmapOptions(res) {
      bitOptions = new BitmapConversionOptions();
         bitOptions.method = BitmapConversionType.HALFTHRESHOLD;
         bitOptions.resolution = res;
         bitOptions.shape = BitmapHalfToneType.SQUARE;
         return bitOptions;
    Photoshop Save As Functions
    function saveFileasTIFF(saveFile, aC, iC, la, sC, tr) {
         tiffSaveOptions = new TiffSaveOptions();
         tiffSaveOptions.alphaChannels = aC;
         tiffSaveOptions.byteOrder = ByteOrder.MACOS;
         tiffSaveOptions.embedColorProfile = true;
         tiffSaveOptions.imageCompression = iC;
         tiffSaveOptions.layers = la;
         tiffSaveOptions.spotColors = sC;
         tiffSaveOptions.transparency = tr;
         activeDocument.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE);
    function saveFileasJPEG(saveFile, qL) {
         jpgSaveOptions = new JPEGSaveOptions();
         jpgSaveOptions.embedColorProfile = true;
         jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
         jpgSaveOptions.matte = MatteType.NONE;
         jpgSaveOptions.quality = qL;
         activeDocument.saveAs(saveFile, jpgSaveOptions, true, Extension.LOWERCASE);

  • Creating an Action and then Batch Process

    Need some help creating an action and then batch processing a file using that action. I was able to do it in previous versions of PS (wish I had kept the action!). For some reason its not working. Keeps creating the same file over and over again. Here goes:
    Action:
    Open up a PDF (separate PDFs of a PowerPoint Pres, may contain 80-100 pages); convert to grayscale; reduce to 43.2%; save as a TIF and close file.
    Batch:
    Use this action on all files.
    When I create the action it just recognizes the first file that I use as a sample and saves over the result over and over again.
    Thanks in advance.
    Tom

    You probably recorded a save as command in it and changed the name of the file. This change is also recorded and after playing the action it just overwrites the same filename over and over again.
    Always leave the filename untouched when recording actions.

  • How to create play all actions in one Click

    Please help

    The first action in that action set play the rest of actions in that action set it does not play all actions. That would require a Photoshop script to retrieve all the loaded action sets and do the action in each. Why would you want to run random actions.
    That first action in the set was the last action recorded in the action set. Started with a make snapshot named normal then select that snapshot then play the next action in the set, The select snapshot normal and play next action is repeated till the rest of the action in the set have been played. Then a stop message is displayed.  The other actions in the set make a group add their effect and make a snapshot.  If you uncheck the stop step you could even batch this action, The stop would stop the batch process.
    Just expand the actions and action steps and read the steps. Actions are easy to record and edit. The action palette is a full function action editor. You can single step and edit at the same time.  Reading action is a good way to learn how to use Photoshop and you will know if an action is going to destroy work you have dons on a document like flatten you work.
    Crafting Actions Package
    Contains
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file.
    12 Scripts for actions
    Example
    Download

  • TS1584 I had my iTunes libray on my old PC, just transferred to my new PC, downloaded iTunes, and my library is there, but can't play songs, says can't locate original files?

    I had my iTunes library on my old Dell Inspiron, transferred all info to my new HP Pavilion PC, downloaded iTunes and my library is there, but when I try to play songs, it says can't play because can't locate the original files...how can I activate the songs to play?  The iTunes library is also in my Windows media file, and the songs will play in there, but I set iTunes as my default music manager and want the songs activated in my iTunes library so I can play them and sync my iPod.  Help?  Thanks.

    This happens if the file is no longer where iTunes expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, or that the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout,or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then cancel when asked to try to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or a drive letter has changed, it should be possible to reverse the actions.
    Alternatively, as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes .
    See also Getting iTunes & Windows Media Player to play nicely
    tt2

  • Batch Reduced File Size?

    I have hundreds of PDFs that have a transparency watermark but the file sizes on each do vary but are just too large. I would love to reduce the file size by running a batch, so I went ahead and created a batch in the Action Wizard that would reduce file size and just resave. The batch worked just fine for the exception of creating "black boxes" of the transparency graphic. Is there a way to reduce the files size and still retain the transparency? Thank you!

    I figured it out.     I had to make sure that file type was set to "Acrobat 5 or higher" in order to maintain the transparency. Any thing older than that produces undesirable effects.

  • Batch rename files on the server?

    Can someone explain how to batch rename files on the server ?
    I have 1000 rows each containing these fields
    id (unique key)
    productCode
    filename1
    filename2
    For every row I need to rename the following fields:
    Rename [filename1] to [productCode]_[id]_1
    Rename [filename2] to [productCode]_[id]_2
    also I need to rename the actual file on the server using the above scheme
    Can someone show me the way ? I'm a little rusty with ColdFusion

    So far I've got everything working apart from CFFILE which works only if it finds a corresponding jpeg file on the server. In other words it works perfectly until row 20 of the database because the filename contained in the field doesn't have a matching jpeg file on the server, so CFFILE fails like this...
    Attribute validation error for tag CFFILE.
    The value of the attribute source, which is currently C:\images\DSCN1293.JPG, is invalid.
    The error occurred in C:\Inetpub\wwwroot\link\htdocs\old_apps\psp\updater.cfm: line 63
    61 :                    action = "rename"
    62 :                    source = #my_source1#
    63 :                    destination = #my_destination1#>
    is there a way to carry on looping through the remaining rows and ignore the above fail ?

  • Batch convert files to 4x6 with copyright?

    How do you batch convert files to 4x6 with copyright?

    How do you batch convert files to 4x6 with copyright?
    You need to create an action in PS (include a conditional option for both landscape and portrait). With this action ready you can select the files in Bridge, use menu Tools, Photoshop / Batch and inhere choose the action you created and let it run.
    For the action itself you might want to visit the PS forum for more details, it is not easy to create a watermark on each image but possible. Just try it and explore.

  • Batching Raw Files

    Has anyone batched Raw files on a MBP. The last wedding I shot (First all digital) I batched 350 Raw files in Capture One Pro on a 800mhz eMac, it took 38 hours. I shot with a borrowed Nikon D1X. That is not the way I want my next shoot to go. So I bought a 1.83 MBP.
    Any photographers out there let me know what to expect.

    Yes if you are using PS6 and creating actions, moving to PS7 is about the same. The droplets do not work that well in PS7. When you goto CS it just works.
    (to create droplet do this).
    Goto window open actions.
    In actions box - dropdown arrow create new action.
    do what you want to a image and it will record it.
    Hit the square to stop recording.
    Step 2.
    File automate - create droplet
    save droplet to desktop
    select where you want the finished product to go (I like desktop)
    click done.
    Now take one image out of a folder or multiple and drop them on the droplet and it will apply the changes to all images.

  • JavaScript to Play Illustrator Action

    Can anyone point me in the right direction as new to scripting.
    I'm trying to write a Javascript to play an Adobe Illustrator CS5 action and then save open file as a pdf.
    I have done the below in AppleScript which works but would like to do in Javascript if possible.
    tell application "Adobe Illustrator"
    do script "6sheet" from "Mine" without dialogs
    end tell
    Thanks in advance
    Cheers Chris

    Thanks Muppet Mark, In That case what would I add to the AppleScript to to save file after action has run to PDF?
    tell application "Adobe Illustrator"
    do script "6sheet" from "Mine" without dialogs
    end tell

  • Every time that I play a tune from my itunes the file duplicates itself into my 'MyDocuments' folder. If I delete this the song is erased from itunes totally. Ideas??

    Everything worked fine for the last two years but now every time that I play a tune from my itunes the file duplicates itself into my 'MyDocuments' folder. If I delete this the song is erased from itunes totally. Ideas??

    You are of course deleting the tunes from within the iTunes interface.
    The settings that I am referring to are your device settings for the iPad. It should show in the left column of iTunes when your iPad is plugged in.
    Go through your playlists and make sure that the tunes(s) are removed from any playlist. You can prevent the sync as noted above then do a sync and the iPad should update with the content from you Mac.
    MJ

  • How can I import a movie into iMovie 09 from a hard drive?  The movie will open and play in idvd but breaks into separate files that can't be downloaded when I try to import.  Can it be done?

    How can I import a movie into iMovie 09 from a hard drive?  The movie will open and play in idvd but breaks into separate files that can't be downloaded when I try to import.  Can it be done? I am trying to create a disc of player highlights for a collegiate coach, and I am using movie files downloaded to my hard drive from a DVD created on a PC. 

    No unfortunately it won't open in quicktime either.  It does the same thing that Imovie does, separates it into two file folders audio and video, and if i select video it opens to reveal 8 files that cannot be selected.  VIDEO_TS.BUP, VIDEO_TS.IFO, VIDEO_TS.VOB,VTS_01_0.BUP, VTS_01_0.IFO, VTS_01_1.VOB, VTS_01_2.VB, VTS_01_3.VOB.  All of which cannot be opened or selected.
    Opening it in Idvd and folllowing your suggestion works and I get a format code of NTSC.  Is that the same?  Thank you for your time and response.
    CaCanuck

  • Batch rename files preserving the original file name in metadata

    How can I batch rename files while preserving the original file name in metadata? (Don't want the old file name as part of the new file name)
    (Adobe CS Bridge can do this with some success, but I don't want to be dependant on this software. Results are inconsistent.)

    With a simple terminal script. More details needed, though.

  • I am not being able to play sound when I import a .MTS file from my folder

    I am not being able to play sound when I import a .MTS file from my folder on my sequence bar of my Premiere Pro CS6. Even if I use my Media Browser to import the file, the video plays fine, but the audio is disabled it seems. I don't know what to do since I have used .MTS files before without hassle on CS5.5. It is quite frustrating. What can I do?

    Hi debesh05,
    Please mention the Operating System that you are using and also make and model of the Camera that was used to capture those clips. Also, try to make another folder with the same name in the same location where the .MTS files are and move all the clips into the new folder and then try to import the files again using Media Browser in Premiere Pro CS6. If this doesn't work then make a copy of one file and rename it as .M2TS and then import that single file into Premiere Pro CS6. Please update if either of the solution works for you.
    Regards,
    Vinay

  • Play audio action doesn't work in Captivate 7

    Hi,
    On the first slide of my course I added a "quick start" guide. It consists of a series of captions containing text. In each caption there's a "Continue" text link triggering an advanced action to hide the current caption and show the next one. This works perfectly.
    Now I wanted to attach audio to each step of the guide. I added a "play audio" action after the show/hide actions for the first step. No audio was playing. When I changed the play audio to be the first action in the script - the script didn't work at all. When I changed it to be between the hide and show, the hide worked and show didn't. What I understand from this is that play audio doesn't work and also halts the whole thing.
    Any advice?
    Thanks

    Just checked it out, created a shared action with almost exactly the same commands, but grouped all the text containers in one group Gr_TC
    to hide:
    It worked perfectly. You don't see a label, because it is a shared action, for which I just filled in some parameters. Attached it to three buttons, had 3 text containers and 3 different audio clips.
    Is the audio clip playing when you use it in another way? The only difference seems to be that you have a VO clip and I used one of the included sounds with Captivate.
    Another way could be to attach the audio to the text container as object audio. Once you show the text, audio will play, when you hide the text it will stop. That was the way to go before CP6:
    http://blog.lilybiri.com/playtime-with-audio-and-widgets
    Lilybiri

Maybe you are looking for