Search in subfolders with actionscript

I want to target files and do specific things for them according to what they call their parent folders. To be more precise, if there are files in the subfolder 'Bad' I want to perform a specific action of photoshop on these files and if there are files in the 'Good' subfolder, perform some other action on them.

I have a folder structure that looks like this:

Images (root folder)

-Holiday

-Good

-else.jpeg

-something.jpeg

-Bad

-else.jpeg

-something.jpeg

-Party

-Good

-else.jpeg

-something.jpeg

-Bad

-else.jpeg

-something.jpeg

-No matter what

-Good

-else.jpeg

-something.jpeg

-Bad

-else.jpeg

-something.jpeg

etc.

Do you mean "ActionScript"? or "AppleScript"?

It's pretty trivial to do in AppleScript, if that's what you mean. There are several ways to do that, but here are two options:

the value topFolder to (choose folder)

say application 'Finder '.

set image files to each file of all content of topFolder whose name is "jpg" extension

Repeat with eachFile in image files

the value subfolderName to the name of container of eachFile

If subfolderName is 'Good' then

-do good things

else If subfolderName is 'Bad' then

-do bad things

end if

end Repeat

end say


Note that using the "entire content" a folder can be notoriously slow, especially for large hierarchies. If this is the case for you in alternate iterates through the folders and files directly:


the value topFolder to (choose folder)

say application 'Finder '.

Repeat with eachFolder in (each folder of topFolder)

-now eachFolder goes through your 'holiday', 'Party', 'Whatever' list

-Browse the files 'good '.

Try

Repeat with eachFile in folder 'Good' of eachFolder

-do good things

end Repeat

end try

-now to browse the files of 'bad '.

Try

Repeat with eachFile in folder 'Bad' of eachFolder

-do bad things

end Repeat

end try

end Repeat

end say

Tags: Mac OS & System Software

Similar Questions

  • What is subfolders with blue colored letters in my program folder windows that look at this $ $MS13Uninstall_kB893803v2?

    I want to know what are subfolders with blue color lettrers in my program folder of windows that look at this $ $MS13Uninstall_kB893803v2.

    These files contain data for uninstall programs and updates.

    they are created during the installation of the programs and updates and contain a card to the back/improper installation.  so if the uninstall files are deleted manually, then the system loses the ability to uninstall all files and registry keys that have been installed.

    so for the example provided in your thread topic, that particular file refers to the kb893803 and you'll find probably listed as a windows update in afforestation programmes.

    You can also search the Web for more inforamation on that Ko.

    DB·´¯'·.. ¸ >-))) º > ·´¯'·.. ¸ >-))) º > share nirvana mann

  • Is there a limit for research on the function of advanced search for files containing text matching. My search always ends with 500 discoveries but the folder contains several PDF files that match the criteria.

    Hello

    Is there a limit for research on the function of advanced search for files containing a text match? My search always ends with 500 discoveries but the folder contains several PDF files that match the criteria.

    Hi carls76936091,

    Open Acrobat, go to the Edit-> Preferences-> search & check if there is a limit to 500 set, in case if it is to increase it please.

    Kind regards
    Nicos

  • Loading of local swf files with actionscript on air for iOS

    I apologize if this seems like it has already been asked, but I'm not sure that having understood the answer, not on the Adobe site, or elsehwere.

    I am developing an app for iOS, targeting the last 3.9 SDK

    I have a main swf file that loads the local swf files. These local swf files have code actionscript in them. I use Flash Professional CS6.

    I publish the application successfully and everything's fine. When I start the app on the iPad, is the main swf and all is well. When I click on the button that loads the local SWF files, nothing happens. They are not loaded.

    It seems that this has been answered, but I'm losing my mind. I don't know what the problem is. I know that, in version 3.9 Air, it is now possible to load local SWF files are actionscript.

    Air for the Android version works perfectly with these local files loaded and unloaded like a charm.

    Any help would be greatly appreciated

    from the air, 3.6, you can load swf with actionscript and that run actionscript.  before 3.6 air that was not allowed (without additional work).

    but your charger must provide a loadercontext object that uses the current applicationdomain:

    var lc:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain,null);

    yourloader. Load (yourexternalswf.swf, LC);

  • If I can reverse a Tween created with the GUI... .with actionscript?

    Hi all

    I'm newer Flash, so it does not take much for granted. I have large gaps in my understanding.

    I created a motion tween (by good service a movieClip on the timeline and selecting 'create the motion tween'). Now I want to reverse the trend (using the term of "yoyo") when the audio file is played. I know how to do this with an interpolation (using the tween class) which was created in the first place with actionscript. How can I do overturn if interpolation is not already (named and included) my actionscript?

    Thank you

    If you tween is in a MovieClip you can actually play the MovieClip it back like this:

    addEventListener(Event.ENTER_FRAME, enterFrame);
    function enterFrame(e:Event):void {
          prevFrame();
    }
    

    I do it all the time.

    -Aaron

  • Change the size of 'police' in a TLF Textfield with actionscript?

    I couldn't realize how do I resize my TLF Textfiels in cs6 flash with actionscript?

    None of them has worked:

    If (...)

    {

    myTLFText.textSize ++;

    myTLFText.fontSize ++;

    }

    Error: Access of size property possibly not defined through a reference with static type fl.text:TLFTextField.

    I appreciate your help please?

    definition of width/height is no help.  Use scaleX and scaleY as I suggested.

  • Is there a way to open a local file not a web file with actionscript 3.0?

    Reason for the request is because I do a Flash of Adobe CS6 multimedia player and I was wondering if there was anyway to make a button to open a local .fla file in a directory with ActionScript 3.0, or if there are other ways I can achieve?

    Thanks, Casey

    with an air application, check the file class.  Otherwise, check the filereference class.

  • How can I search for characters with no applied font?

    I have a document with many Chinese mixed with the English. Unfortunately the conversion of the Word always remove part of the formatting of the characters. It's time consuming to manually find a square with a cross boxes, anyone knows a method to search for characters with no police?

    There seems to be no option in find/replace to choose no font / no as it does with the paragraph styles and character styles.

    See here http://www.kahrel.plus.com/indesign/missing_glyphs.html

    and here http://indesignsecrets.com/tackling-missing-glyphs.php

  • Load SWF a remote server with ActionScript in AIR base iOS ipa

    Hi Nimisha1,

    Can you please confirm if I can SWF load of distance on the server with ActionScript in AIR iOS ipa?

    Any help regarding this is appreciated.

    Thank you

    Amandeep Singh

    Hi Steve,.

    You cannot load a swf file on a remote server that contains ActionScript.

    Thank you

    Nimisha

  • Set the effect of BitmapImage with actionscript

    Hi all

    I met it in a mobile application that needs to display the icon in IconItemRenderer with a fade effect (0 to 1.0 Alpha). But for me, it is general that the way to set the effect with actionscript? In addition, I'm not sure if the BitmapImage support this.

    Anyone would help show me the codes of configuration effect (not MXML)?

    Kind regards

    Felix

    
    http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHandler(event)">
         
         
         
              
         
         
              
         
    
    

    This some how work for me.

  • How to catch events with ActionScript in InDesign CS5

    Could some kind soul please be proivde a complete example or provide a link to a complete example to listen to and manipulate one even in InDesign with ActionScript extensions? All of the examples I see are for JavaScript and will not work in ActionScript.

    TIA,

    mlavie

    Hey!

    I suggest you look here: http://blogs.adobe.com/cssdk/2010/08/makesideheads-a-complete-indesign-cs5-panel-2.html

    It is the excellent post from Olav on the creation of Panel for InDesign. There are also "id_host_adapter.swc" which is necessary to create event listeners. Import library:

    import com.adobe.cshostadapter.*;
    

    After the successful importation of library, you can attach event like this:

    IDScriptingEventAdapter.getInstance().addEventListener(com.adobe.indesign.Event.AFTER_SELECTION_CHANGED, listener);
    

    Hope that helps.

    --

    tomaxxi

    http://indisnip.WordPress.com/

  • Creating a ComboBox with ActionScript

    I can't create a ComboBox with ActionScript. I want just a simple list, I can add and subtract.

    My Code:

    var inventory: ComboBox = new more.

    Error messages:

    Scene 1, Layer ' Layer 1 ', 1 environment, line 142 1046: Type was not found or is not a constant of compilation: ComboBox. "

    Scene 1, Layer ' Layer 1 ', 1 environment, line 142 1180: call to a method may not set ComboBox. "

    I don't know where I am going wrong. I found several example on the net which was code similar to mine, and some suggested adding the following:

    import fl.controls.ComboBox;

    That didn't work either and gave me more errors. Any suggetions?

    Thanks.

    I should have mentioned to keep this import line.

  • AdvancedDataGrid - add columns with ActionScript

    I am trying to add columns in an AdvancedDataGrid via ActionScript.

    I can't make it work.

    I tried two approaches - with an intermediary table to store the columns then set the adg in table columns; One where I assign columns directly to the table of columns of the adg.

    They are likely to fail in their own way.  The columns don't "take" and the adg uses the default values for dataProviders, or there are no columns at all.

    "adg_test.mxml" has the code AdvancedDataGrids. 

    'adg_test_renderer.mxml' is a rendering engine for one of the columns.

    Would appreciate learning what I'm doing wrong.

    Thanks for any help.

    = Adg_test_renderer.mxml START =.

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:VBox ' http://www.Adobe.com/2006/MXML ">
    < mx:Button id = "btnTest" label = "Working Renderer" / >
    < / mx:VBox >

    = Adg_test_renderer.mxml END =.

    == Adg_test.mxml START =.

    <? XML version = "1.0"? >
    < mx:Application
    ' xmlns:mx = ' http://www.Adobe.com/2006/MXML "
    Initialize = "init ()" >

    < mx:Script >
    <! [CDATA]
    Import mx.collections.ArrayCollection;

    [Bindable]
    private var dpADGExplicit:ArrayCollection = new ArrayCollection([)
    {Artist: 'Pavement', Album: 'Slanted and enchanted', price: 11.99},.
    {Artist: 'Pavement', Album: 'Brighten the corners', price: 11.99},.
    {Artist: 'Saner', Album: 'A child once', price: 11.99},.
    {Artist: 'Saner', Album: 'Helium wings', price: 12.99},.
    {Artist: 'The doors', Album: 'The doors', price: 10.99},.
    {Artist: 'The doors', Album: "Morrison hotel", price: 12.99},.
    {Artist: 'Grateful Dead', Album: 'American Beauty', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'In the Dark', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'Shakedown Street', price: 11.99},.
    {Artist: 'The doors', Album: 'Strange Days', price: 12.99},.
    {Artist: 'The doors', Album: 'The best of the doors', price: 10.99}
    ]);

    [Bindable]
    private var dpADGActionScript:ArrayCollection = new ArrayCollection([)
    {Artist: 'Pavement', Album: 'Slanted and enchanted', price: 11.99},.
    {Artist: 'Pavement', Album: 'Brighten the corners', price: 11.99},.
    {Artist: 'Saner', Album: 'A child once', price: 11.99},.
    {Artist: 'Saner', Album: 'Helium wings', price: 12.99},.
    {Artist: 'The doors', Album: 'The doors', price: 10.99},.
    {Artist: 'The doors', Album: "Morrison hotel", price: 12.99},.
    {Artist: 'Grateful Dead', Album: 'American Beauty', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'In the Dark', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'Shakedown Street', price: 11.99},.
    {Artist: 'The doors', Album: 'Strange Days', price: 12.99},.
    {Artist: 'The doors', Album: 'The best of the doors', price: 10.99}
    ]);

    private function init (): void
    {
    var arr:Array = []; table of //Intermediary which became the AdvancedDataGridColumn table
    var col: AdvancedDataGridColumn = new AdvancedDataGridColumn();

    col.dataField = "artist";
    arr.push (col);

    col.dataField = 'Album ';
    Col.Visible = false;
    arr.push (col);

    col.dataField = "Price";
    col.itemRenderer = new ClassFactory (adg_test_renderer);
    arr.push (col);

    adgActionScript.columns = arr;

    UNSUCCESSFUL ALTERNATIVE APPROACH

    /*
    col.dataField = "artist";
    adgActionScript.columns.push (col);

    col.dataField = 'Album ';
    Col.Visible = false;
    adgActionScript.columns.push (col);

    col.dataField = "Price";
    col.itemRenderer = new ClassFactory (adg_test_renderer);
    adgActionScript.columns.push (col);
    */
    }

    []] >
    < / mx:Script >

    < mx:Label text = "Explicit columns" / >

    < mx:AdvancedDataGrid
    ID = "adgExplicit".
    Width = "100%" height = "100%".
    sortExpertMode = "true".
    dataProvider = "{dpADGExplicit}" >
    < mx:columns >
    < mx:AdvancedDataGridColumn dataField = "Artist" / >
    < mx:AdvancedDataGridColumn dataField = "Album" visible = "false" / >
    < mx:AdvancedDataGridColumn dataField = "Price" itemRenderer = "adg_test_renderer" / >
    < / mx:columns >
    < / mx:AdvancedDataGrid >

    < mx:Label text = "columns ActionScript (ActionScript so works: Arist column should be hidden.)" Should see Album with data columns and price with the buttons. / >

    < mx:AdvancedDataGrid
    ID = "adgActionScript".
    Width = "100%" height = "100%".
    sortExpertMode = "true".
    dataProvider = "{dpADGActionScript}" >
    < / mx:AdvancedDataGrid >

    < / mx:Application >

    == Adg_test.mxml END =.

    If you are looking to add columns with ActionScript, follow this.

    var _advancedDataGrid: AdvancedDataGrid = new AdvancedDataGrid();

    var columns: Array = _advancedDataGrid.columns;

    Columns.push (new AdvancedDataGridColumn ('field1'));

    Columns.push (new AdvancedDataGridColumn ('field2'));

    Columns.push (new AdvancedDataGridColumn ('field3'));

    _advancedDataGrid.columns = columns;

    _advancedDataGrid.validateNow ();

  • Create remoteObject with ActionScript, no MXML

    I want to use remoteObject with ActionScript only, no MXML:

    private function initializeRemoteObject (): void {}
    _distante = new RemoteObject;
    _remote.source = "AMFProxyObject";
    _remote.endpoint = " " http://localhost/linktoMyAMFServer ";
    _remote.destination = 'zend ';
    _remote.showBusyCursor = true;
    }

    public function getIAllData (): void {}
    initializeRemoteObject();
    var token: AsyncToken = _remote.getAllDataFromStoryTable ();
    Token.Result = getDataHandler;

    I'm stuck here because I don't know the proper syntax to handle the result
    }

    private void getDataHandler () empty

    {

    ;//

    }

    I want to just convert the MXML below in ActionScript code.

    < mx:RemoteObject id = "zendRemoteObject" destination = "zend" source = "AMFProxyObject".
    " endpoint =" http://localhost/linktoMyAMFServer "         
    result = "resultHandler (Event)" >

    < name mx:method = "getAllDataFromStoryTable" result = "getDataHandler (event)" / >
    < / mx:RemoteObject >

    Thank you very much. It's driving me crazy, as I couldn't find any help online by Google.

    Try to use an answering machine, specifically an AsyncResponder.

       var token:AsyncToken = _remote.getAllDataFromStoryTable();
    
       var responder:AsyncResponder = new AsyncResponder( resultHandler, faultHandler );   token.addResponder( responder );
    
       public function resultHandler( event:ResultEvent, token:Object=null ):void   {      Alert.show( "RESULT: "+ event.result as String );   }
    
       public function faultHandler( event:FaultEvent, token:Object=null ):void   {      Alert.show( "FAULT: " + event.fault.message );   }
    

    The following documents may be useful:

    http://www.flexafterdark.com/docs/ActionScript-responder

    I hope this helps...

    Ben Edwards

  • Swap symbol graphic Bitmap dynamically with Actionscript

    I have a graphic symbol that contains a Bitmap, and I would exchange the Bitmap inside the graphic symbol with an external image file when running with actionscript. The graphic symbol is used in interpolation, and I want to dynamically change the image that is used in the interpolation.

    The graphic symbol is part of a MovieClip, so I think I need to use the MovieClip loadMovie method. But, how do you get graphic symbol and so the bitmap inside the graphic symbol.

    Hope I'm making sense here. I tried quitting a little and seems to have an answer for this.

    Thank you!

    You can't use actionscript for refernce a graphic symbol. in particular, you cannot dynamically change anything on a graphic symbol.

    In addition, you cannot dynamically change a Tween with actionscript without breaking the interpolation.

    You can use a movieclip and actionscript to animate anything that you want to animate.

Maybe you are looking for