A script to open files in a directory that have certain properties

I need a script to open all JPG files in a directory and it's subfolders that have a height greater than the width and then run a specific photoshop action for each (inlcuding a save for web within the same directory). Not sure if it's best to record that into the action as it will probably always try to save in the same directory. Probably need something similar to the batch options available in Photoshop that override this...
Any help is much appreciated.

I think I found what I'm looking for in ImageReady although I'm not sure how to set it to batch. I don't see the batch command in the File menu like Photoshop...

Similar Messages

  • Open file from a directory that is not web accessible?

    Subject says it all really, I'd like users to be able to download files from a directory that is otherwise not accessible by the browser. There is a way to do this is PHP, the readfile() function. Is there something equivalent in Java?
    Thanks!

    You can do that with a Servlet and a shot of java.io API.
    Here's an example: [http://balusc.blogspot.com/2007/07/fileservlet.html].

  • Textedit doesn't open files. I think I have an old version, version 1.1. How do I update it?

    textedit doesn't open files. I think I have an old version, version 1.1. How do I update it?

    What OS are you on?
    Are you certain it is not compatible with this OS?
    Is there an error message presented?
    What type of file are you trying to open?
    TextEdit is a built in app, shipped with the OS, it can't be downloaded from the store, have you copied TextEdit from a backup or is it trying to run from a backup disk or other copy of the OS - Spotlight can sometimes find & try to run other versions. Eject any backup disks & retry.
    Try opening directly from /Applications (the Finders 'Go menu > Applications' will take you there).
    If you need to restore the App you will need to have it in a backup or use the OS installer.

  • Illustrator script to open file in Photoshop

    The Bridge SDK has a script to open a selected file in Photoshop.
    Can this  be done from Illustrator instead?
    It seems that the cross-dom function open() should work in either an illustrator or bridge script, yet the following does NOT work in Illustrator.
    Fresh from the Bridge 5.1 SDK, it doesn't work in Bridge either, but that's for a different forum.
    var t = app.activeDocument.fullName;
    Photoshop.open(new File(t));
    It provides me with Error 2: Photoshop is undefined.
    So, any ideas on how to make this work?
    This is all leading up to the real problem, which is to create a 150dpi jpg file, which Illustrator won't do.
    Thanks All.
    --Alex

    There are several ways in which you could get you output *jpeg to 72 dpi at a given set of dimensions… On way would be to scale the whole art in AI before exporting it… Up to you if you save this change or not… You can have PS open the image and alter the resolution after exporting… Or on the mac you could use some utility like the shell SIPS which you also have AppleScript access to via Image Events scripting… Anyhows here is a very basic example of how th pass a file object to PS using the bridgetalk messaging system… The Adobe way of doing it so to speak… I included a filp just so's you could see the changes made… Have fun…
    #target illustrator
    var aiFile = File( '~/Desktop/zdfb.jpg' );
    var psScript = 'app.displayDialogs = DialogModes.NO;';
    psScript += 'app.open(' + aiFile.toSource() + ');';
    psScript += 'app.activeDocument.resizeImage( undefined,undefined,72,ResampleMethod.NONE);';
    psScript += 'app.activeDocument.flipCanvas( Direction.HORIZONTAL );';
    psScript += 'app.activeDocument.close( SaveOptions.SAVECHANGES );';
    psScript += 'app.displayDialogs = DialogModes.ALL;';
    //$.writeln( psScript );
    btMessaging( 'photoshop',psScript );
    function btMessaging( targetApp, script ) {
              var bt = new BridgeTalk();
              bt.target = targetApp;
              bt.body = script;
              bt.onResult = function( inBT ) { alert( 'Done…' ) };
              bt.onError = function( inBT ) { alert( 'NOT Done…' ) };
              bt.send( 20 );
    There are numerous ways in which you can construct the script 'string' contents on the fly but you get the general idea…

  • Script to read files in a directory

    Dear Experts,
    I am new to UNIX and I have a requirement to read the names of a file in a directory. I have some script below and in this test case I am reading the names of the files in the present directory into a variable and then looping through each file name and displaying the name back to the screen. The problem I have is although there are 5 files in the directory, it only ever displays the name of the first file and then stops. Can you assist?
    Many thanks,
    Mark
    #!/bin/csh
    set files = `ls`
    foreach file ( $files )
    echo 'File name:' $file
    end

    The script is correct.
    You may have odd results if you have an alias like "alias ls='/bin/ls $LS_OPTIONS'"
    and if you have "hidden" files starting whith a single .
    An example:
    obelix:~ # ls
    . .bash_history .gconf .history .rnd tnt
    .. .dmrc .gconfd .kbd .skel
    .DCOPserver_obelix_:0 .exrc .gnome .kde .viminfo
    .DCOPserver_obelix__0 .fonts .gnome2 .mcop .xsession-errors
    .ICEauthority .fonts.cache-1 .gnome2_private .mozilla Desktop
    .Xauthority .fvwm .gnupg .qt bin
    obelix:~ # \ls
    Desktop bin tnt
    obelix:~ #
    --------------------------

  • Run Script for opened files

    Hi,
    I once got a script by this thread (http://forums.adobe.com/thread/962689)
    That script gets Indesign files from a specific folder,
    now I want to change this script, so it can be used for allready opened Indesign files.
    Below is the original script (with huge thanks to Muppet Mark)
    #target indesign
    function exportFolder() {
               var i, inFolder, idFiles, doc, offSet, pdfPre, pdfFile;
               inFolder = Folder.selectDialog( 'Where\'s the folder of ID files?' );
               if ( inFolder == null ) { return };
              idFiles = inFolder.getFiles( '*.indd' );
              for ( i = 0; i < idFiles.length; i++ ) {
                        doc = app.open( idFiles[i] );
                        offSet = doc.documentPreferences.documentBleedTopOffset;
                        if ( offSet == 0 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 3 mm snit + slug' ) };
                        if ( offSet == 3 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 3 mm snit + slug' ) };
                        if ( offSet == 5 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 5 mm snit + slug' ) };
                        if ( offSet == 10 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 10 mm snit + slug' ) };
                        if ( offSet == 11 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 11 mm snit + slug' ) };
                        if ( offSet == 12 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 12 mm snit + slug' ) };
                        if ( offSet == 13 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 13 mm snit + slug' ) };
                        if ( offSet == 14 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 14 mm snit + slug' ) };
                        if ( offSet == 15 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 15 mm snit + slug' ) };
                        if ( offSet == 16 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 16 mm snit + slug' ) };
                        if ( offSet == 17) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 17 mm snit + slug' ) };
                        if ( offSet == 18 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 18 mm snit + slug' ) };
                        if ( offSet == 19 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 19 mm snit + slug' ) };
                        if ( offSet == 20 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 20 mm snit + slug' ) };
                        pdfFile = File( doc.fullName.toString().replace( '.indd', '.pdf' ) );
                        doc.exportFile( ExportFormat.pdfType, pdfFile, false, pdfPre, '', false );
                        doc.close( SaveOptions.NO );
    exportFolder();

    Hi jocstone_me,
    I modified your JS code, Please try the below code its working.
    #target indesign
    function exportFolder() {
    var i, inFolder, idFiles, doc, offSet, pdfPre, pdfFile;
    inFolder = Folder.selectDialog( 'Where to save the InDesign files?');
    if ( inFolder == null ) { return };
    idFiles = app.documents.length;
    for ( i = 0; i < idFiles; i++ ) {
        doc = app.documents[i];
        doc = app.activeDocument;
        offSet = doc.documentPreferences.documentBleedTopOffset;
        if ( offSet == 0 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 3 mm snit + slug' ) };
        if ( offSet == 3 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 3 mm snit + slug' ) };
        if ( offSet == 5 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 5 mm snit + slug' ) };
        if ( offSet == 10 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 10 mm snit + slug' ) };
        if ( offSet == 11 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 11 mm snit + slug' ) };
        if ( offSet == 12 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 12 mm snit + slug' ) };
        if ( offSet == 13 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 13 mm snit + slug' ) };
        if ( offSet == 14 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 14 mm snit + slug' ) };
        if ( offSet == 15 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 15 mm snit + slug' ) };
        if ( offSet == 16 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 16 mm snit + slug' ) };
        if ( offSet == 17) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 17 mm snit + slug' ) };
        if ( offSet == 18 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 18 mm snit + slug' ) };
        if ( offSet == 19 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 19 mm snit + slug' ) };
        if ( offSet == 20 ) { pdfPre = app.pdfExportPresets.itemByName( 'LANNOO 20 mm snit + slug' ) };
        pdfFile = File(inFolder+"/"+doc.name.toString().replace( '.indd', '.pdf' ) );
        doc.exportFile( ExportFormat.pdfType, pdfFile, false, pdfPre, '', false );
        doc.close( SaveOptions.NO );
    exportFolder();
    thx,
    csm_phil

  • Where is the file drop down to open files on my computer that's a biggie

    Hello
    on the version FIREFOX I have their is a file dropdown that allows me to
    get files from my computer the link in the upper left hand corner
    says FILE and I click it and and their is a several links such as
    NEW WINDOW/ NEW TAB/ OPEN LOCATION/ OPEN FILE
    OPEN FILE is very important to me as I use it creating web sites.
    I may be looking in the wrong place the version I downloaded
    is the 7.1 and it has a new look from the one I have.
    so please let me know maybe this feature is not on this version
    that would be sad. let me know if it is on some other version
    because I use it a lot.
    Thank you
    ken

    hello
    Sorry I saw the answer to my last question which was...
    "Is their other codes like alt+f for getting the files like one for tools or history like alt+g or alt+m Is their a list somewhere that teaches that. or are they accussed some other way". I see it is all up with the alt+f code
    so my question should be is their anyway to keep the alt+f
    menue up on the all the time.
    Thanks
    Ken

  • How can I change the default "file type" in the open file dialog when using Firefox on certain web pages?

    I work for a bankruptcy attorney. We use the Court's file upload to file our documents. When I am on the Court's site and I have to pick a file to upload, the "open file" dialog box pops up. In Firefox, the default "file type" is always "image" files. I need it to be "all files". How can I change this setting?

    Two observations.
    First — "Tools-> ...." is specific to Acrobat X and XI. It did not exist prior to Acrobat X.
    Second — Acrobat 9 Pro / Standard (nor earlier release) does not support viewing a PDF page containing a scanned image and performing a right-click  ... Save Image As. 
    The context menu provided by Acrobat 9 Pro with a right-click on a scanned image is:
    The context menu,from a right-click with the TouchUp Object tool selected, for Acrobat 9 Pro is:
    So, to paraphrase what Paul Harvey used to say ... What's the rest of the story?
    Be well...

  • Firefox keeps asking me what program to use to open file types even though I have selected one and checked "do this for all files of this type" going foward

    I am working in Windows and every time I open an attachment, Firefox asks what program to use to open files of this type. I always select the proper program and then check the box that says use this program for all future files of this type. In spite of that, the program continues to ask for every file. How do I turn off this feature and just have the program remember the correct program to use for each type of file extension?

    Regardless of your download preferences, web servers can trigger a download prompt by sending either the ''Content-Type: application/octet-stream'' or the ''Content-Disposition: attachment'' header. You can check if that's the case by examining the server response headers in the [https://developer.mozilla.org/docs/Tools/Web_Console Web Console].
    For the latter problem install the InlineDisposition add-on and see if it helps.
    * https://addons.mozilla.org/firefox/addon/inlinedisposition/
    If the problem persists, post back here with either an example link or a screenshot of the relevant response headers in the Web Console.
    * [[How do I create a screenshot of my problem?]]

  • How can I get a count of files in a directory that does not include subfolders?

    Information [Comand I] gives me an "items" number that includes subfolders; however, Box gives me a number that excludes subfolders and includes only files. I am trying to double check that I have migrated everything from a local directory to a Box; thus, I would like a way to a count of just the number of files in a local directory that does not include subfolders but rather is limited to files. This has been surprisingly hard to find.
    Thanks,
    Stu

    Sort the contents of the folder by Kind. While holding down the Shift key  click on the first and last file and start to drag them.  The number of the files being dragged will be displayed in a red circle.
    Not elegant but works.

  • Illustrator CC 2014 can not open file if you save that in Illustrator 8

    Hi,
    Illustrator CC 2014 can not open file again f you save that file in Illustrator 8. Using Illustrator CC 18.0.0
    TIA.

    Hi Imran,
    Can you please share your file (original source file which I can open in AI CC 2014 ) with me?
    I want to down-save that in Illustrator 8 and check that what is happening in this workflow.
    Thanks & Regards,
    Raghuveer
    [email protected]

  • MacOS keep open file in home directory

    I don't know if I've changed anything but my Mac keeps open every files written in the HOME directory with the default editor. Any idea to modify this behavior? I'm using Mac OS X 10.6
    Thank you in advance.

    Never mind. I was able to fix it. Just delete every thing from ~/Library/Preferences (or move all files to another location and then move them back if you don't want to lose your settings).

  • Cannot open files in Captivate 5 that were create using Captivate 5.5

    I created a few videos using Adobe Captivate version 5.5 using the trial version.
    After a few days i got the license for Adobe Captivate 5 and im trying to open the files that i created using Adobe captivate 5.5.
    When i try to open the files Captivate shows up an error message telling 'The file might already be open or it does not exist'.
    I understand they are two different versions. Has someone faced anything like this before ? Please let me know if you have solutions to open the files i have created.
    Thanks
    Chetan

    You can only open Cp 5.5 files with Cp 5.5.
    There is no solution for opening these files in Cp 5 version.
    May I ask, why did you not get a license of Cp 5.5?  It's been around for over 6 months now.

  • Can't open file because I don't have permission to view

    Hi, this just starting happening with my macbook pro.  The files I just tried to open were .pdf files, and I am using foxfire as usual, but now after downloading the file, I just see a box that says that I do not have permission to view the file and it will not open.  I did use disk utility to repair permissions and restarted the laptop, but that did not work...  Can anyone help me?    Thank you.

    Back up all data. Quit Preview if it's running.
    Hold down the option key and select Go ▹ Library from the Finder menu bar. From the Library folder, delete the following items, if they exist:
    Caches/com.apple.Preview
    Containers/com.apple.Preview
    Preferences/com.apple.Preview.LSSharedFileList.plist
    Preferences/com.apple.Preview.SandboxedPersistentURLs.LSSharedFileList.plist
    Saved Application State/com.apple.Preview.savedState
    Launch the application and test.

  • Scanned a doc and got message "couldn't open file because you don't have permission to view it. what should I do?

    I scanned a doc into my mac air and I got a message: file couldn't not be opened because you don't have permission to view it.  I have done this many times before and never had a problem.  What should I do?

    cashewnut12 wrote:
    Please help.   I need to get this work done.
    the problem is not solved.  I need help
    Now that you have marked your question as solved there will be little interest in it and little chance of a solution for you.
    Start a new thread, don't mark it as solved until it is.

Maybe you are looking for

  • INBOUND_IDOC_PROCESS vs IDOC_INBOUND_WRITE_TO_DB

    Hello together, currently I use the function module INBOUND_IDOC_PROCESS in BACKGROUND TASK to create orders. Now some other software has been changed and the length of 10 Bytes for the field SEGNAM is not enough. However the function module INBOUND_

  • Debugging: How can I find out what fires "Login-prompt"

    Hello! I'm writing an applet which reads 2 files on the server. The files are "above" .htaccess, and I don't have to enter username/password to read them. However, I DO get promptet for u/p when the applet loads. How can I possibly find out what gene

  • Adobe Muse CC Never Downloads

    Hi, I am using the latest AAM (I think). I am trying to install Adobe Muse CC, which I can see in the list of applications. I click "Install" and it says "Downloading..." but it just sits there and never downloads. Any help would be appreciated. I am

  • Dynamic alert management

    hi I want to send an alert on a button click  this happens only when the user clicks the button this alert is not a periodic alert is it possible to achieve this with out defining the query in sap b1

  • Help! Change of number

    So my iPhone was stolen the other day and i've now got a replacement along with a new number which is all fine by me. However, I had my phone linked to both my Macbook Pro and iPad, which means they're both still using my old number for imessage and