Script for Multiple Folders (Changeable)

Okay, here is what I am needing but can't figure out. I need a script that will allow me to make multiple folders with "name and number sequence" that I specify in a folder that I specify. For example:
Main Folder (Whatever one I choose)
Name 01
Name 02
Name 03
I would like to be able to change the name at will and how many folders that are created. If anyone could help me I would be grateful as it would save me a ton of time.
Thanks

like this...
activate
set the_folder to choose folder with prompt "Select the folder you want to add folders to..."
tell application "Finder"
set the_name to "Name"
set the_count to 3
repeat with this_num from 1 to the_count
set new_num to this_num as string
if (count new_num) is 1 then set new_num to "0" & new_num
make new folder at the_folder with properties {name:the_name & " " & new_num}
end repeat
end tell

Similar Messages

  • Is it possible to search for multiple folders with the same name and...

    Is it possible to search for multiple folders with the same name and then select them all and change the permissions on just those folders .i.e. Search for the budget folders in all client folders and lock them down to just the project managers. Without having to go to each folder and apply the permissions.

    user11919409 wrote:
    Is it possible to create a Clone database with the same name of source db using RMAN ...
    yes
    >
    DB version is 11.2.0.2
    Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....yes
    Handle:     user11919409
    Status Level:     Newbie (10)
    Registered:     Dec 7, 2009
    Total Posts:     102
    Total Questions:     28 (22 unresolved)
    why do you waste time here when you rarely get any answers to your questions?

  • One script for multiple loaded movie clips

    Hello,
    I am sure that this has been asked or answered before, but
    could not locate the correct response.
    Problem:
    There are 20 movie clips loaded onto the stage through
    actionscript. I have 20 different onPress scripts to start the drag
    for each (which also contain custom variable).
    Problem, I have one single onRelease script which is to be
    used for each, but do now wish to give 20 custom handled scripts.
    Can I somehow use certain scripting for using one single
    generic script for the onRelease? So no matter what was released it
    will go through this one script.
    Thanks
    D

    like this...
    activate
    set the_folder to choose folder with prompt "Select the folder you want to add folders to..."
    tell application "Finder"
    set the_name to "Name"
    set the_count to 3
    repeat with this_num from 1 to the_count
    set new_num to this_num as string
    if (count new_num) is 1 then set new_num to "0" & new_num
    make new folder at the_folder with properties {name:the_name & " " & new_num}
    end repeat
    end tell

  • Printing sap script for multiple customers

    Hi,
    I have a requiremnt to print the form for multiple customers. How should i use the sap script function modules? i.e. in which sequence?
    for example customer A has 5 pages. customer B has 4 pages.
    after printing 5 pages of the customer A, it should print 4 pages of the customer B.
    regards,
    CK

    To print accroding to your requirment you should modify your driver program like this...
    Sort <Internal table by KUNNR.
    LOOP AT <internal table>
    AT NEW KUNNR. "Customer..
    **Call Function module OPEN_FORM
    END AT.
    AT END OF KUNNR.
    ***Call function CLOSE_FORM
    ENDAT.
    ***Call all your Write_FORM
    ENDLOOP.
    Regards,
    SaiRam

  • Generating Insert Scripts for multiple tables

    Hi,
    I have 6 tables TABLA,TABLB,TABLC,TABLED,TABLEE,TABLEF
    I want to generate Insert Scripts for the above 6 tables.
    Is there any mechanism to do so so that i can generate the .sql files for the above 6 tables to another schema?
    Any help will be needful for me.

    Hi,
    May the below given function script help you...
    CREATE OR REPLACE FUNCTION get_insert_script (v_table_name VARCHAR2)
       RETURN VARCHAR2
    AS
       b_found   BOOLEAN         := FALSE;
       v_tempa   VARCHAR2 (8000);
       v_tempb   VARCHAR2 (8000);
       v_tempc   VARCHAR2 (255);
    BEGIN
       FOR tab_rec IN (SELECT table_name
                         FROM all_tables
                        WHERE table_name = UPPER (v_table_name))
       LOOP
          b_found := TRUE;
          v_tempa := 'select ''insert into ' || tab_rec.table_name || ' (';
          FOR col_rec IN (SELECT   *
                              FROM cols
                             WHERE table_name = tab_rec.table_name
                          ORDER BY column_id)
          LOOP
             IF col_rec.column_id = 1
             THEN
                v_tempa := v_tempa || '''||chr(10)||''';
             ELSE
                v_tempa := v_tempa || ',''||chr(10)||''';
                v_tempb := v_tempb || ',''||chr(10)||''';
             END IF;
             v_tempa := v_tempa || col_rec.column_name;
             IF INSTR (col_rec.data_type, 'CHAR') > 0
             THEN
                v_tempc := '''''''''||' || col_rec.column_name || '||''''''''';
             ELSIF INSTR (col_rec.data_type, 'DATE') > 0
             THEN
                v_tempc :=
                      '''to_date(''''''||to_char('
                   || col_rec.column_name
                   || ',''mm/dd/yyyy hh24:mi'')||'''''',''''mm/dd/yyyy hh24:mi'''')''';
             ELSE
                v_tempc := col_rec.column_name;
             END IF;
             v_tempb :=
                   v_tempb
                || '''||decode('
                || col_rec.column_name
                || ',Null,''Null'','
                || v_tempc
                || ')||''';
          END LOOP;
          v_tempa :=
                v_tempa
             || ') values ('
             || v_tempb
             || ');'' from '
             || tab_rec.table_name
             || ';';
       END LOOP;
       IF NOT b_found
       THEN
          v_tempa := '- Table ' || v_table_name || ' not found';
       ELSE
          v_tempa := v_tempa || CHR (10) || 'select ''- commit;'' from dual;';
       END IF;
       RETURN v_tempa;
    END;(copied and pasted from a commercial site)
    *009*
    Edited by: 009 on Jan 14, 2010 10:43 PM
    (Function after debug)

  • FDM integration script for multiple locations

    Hi,
    I have a slight problem with FDM integration script (SQL integration).
    From what I've understood and tested within one FDM-application (tablespace) I'm not able to have multiple integration scripts. This because the integration script needs to be named SQLIntegration.uss, otherwise there will be an error.
    I have multiple locations within one FDM-application where I would like to use an integration script. Due to the above mentioned naming "bug", I need to include all my locations' integration information in one script. As imagined this is not a solution that easy to maintain or easy to read.
    - Is there a workaround for the name-bug?
    - Can I call a function within the main function? I tried without any success, but maybe you would have a solution.
    Any input would be beneficial

    user10757003 wrote:
    Not sure what you mean when you say you rename the file and you get the error.
    Is this a new integration script you have created and cut / pasted the existing integration script contents? If so, did you remember to change the SQLINTEGRATION = TRUE statement at the end of the script to the new integration script name? this might be the reason why you get the 'Import Successful' popup and the Import error dropdown.What I mean is that scripts are name xxx.uss abc.uss. This should be fairly clear.
    Now I have the SQLIntegration.uss, if I change the name of the script to SQLIntegration1.uss or any name. The script will not work. And I receive one error and one success message as stated above.
    Note: I'm not changing the content or anything else inside the script.

  • Simple Script for Multiple Objects?

    Someone recently helped me with setting an opacity level for an object using this one line script and binding a keyboard shortcut to it: app.selection[0].transparencySettings.blendingSettings.opacity=50; (Pressing "5" sets the object's opacity to 50%)
    Although the script works perfectly for one object, when mutiple objects are selected it only affects the first selected object. Can someone show me how to get this script to affect multiple objects at once?
    Thanks in advance!

    Thanks for the help man, but what's with the snarky comment? lol. Yeah I use my "5" key daily as well. But in ID it does nothing while in the default context, so why not put it, and the other digits to use to quickly set object opacity? (this function is similar to setting opacity for Photoshop layers by the way).
    Have a nice day, and cheer up. Spring's almost here.

  • OpenScript 9.1 - use one script for multiple environments

    Greetings everyone.
    I am using Openscript 9.1 on Windows XP. I want to record a script on a web application hosted in one environment and reuse the same script (with minimal re-work) against the same web application hosted in a different environment. For example, record in development and reuse in test and production.
    From what I read on the Internet, the only way to do it is to find the URL in the Java code of the script and replace it as needed. Is there a more sophisticated way of doing this? Thanks in advance for your time and response.

    This one could work:
    WITH t AS (SELECT ROWNUM rn,
                      ' abcdefghijklmnopqrstuvwxyz' char_table
                 FROM all_objects)
    SELECT 1000 + ROWNUM - 1 empid,
           'king ' || char_counter,
           100 + (ROWNUM - 1) * 100 sal
      FROM (SELECT char_counter
              FROM (SELECT SUBSTR(t1.char_table, t1.rn, 1) || SUBSTR(t2.char_table, t2.rn, 1) char_counter
                      FROM t t1,
                           t t2
                     WHERE t1.rn <= 27
                       AND t2.rn <= 27
                       AND t2.rn >  t1.rn
             ORDER BY char_counter
    WHERE ROWNUM <= 100
    ; C.

  • Script for multiple tp addtobuffer and tp import in windows OS

    Hi Gurus,
    Can someone extend some asssitance? I need to transport 5000 transport request in OS level (window). I wanted to create a script that will enable me to addtobuffer and tp import all this 5000 request and will show the error code of the particular TPs that encountered an error.
    Need your immediate assistance please?

    Hi,
    You can do the following
    1.     Compose all the requests in the given specified format.
    tp addtobuffer REQUEST SID client=XXX pf= Transport domain profile  Using excel sheet.
      We should have following things
    a.     Request IDs such as <SID>K9XXXXX
    b.     SID of the system for which these requests are to be imported.
    c.     Specific client no.
    d.     Transport domain profile.
    The final format of the excel sheet with all the transport requests should look like this.
    This format needs to be pasted on to the text file. (transports.txt), in windows you can save as .cmd  or bat format may be.
    tp     addtobuffer     <SID>K9XXXXX     <target SID>     client=XXX pf=TP_DOMAIN_SID.PFL
    tp     addtobuffer     <SID>K9XXXXX     <target SID>     client=XXX pf=TP_DOMAIN_SID.PFL
    tp     addtobuffer     <SID>K9XXXXX     <target SID>     client=XXX pf=TP_DOMAIN_SID.PFL
    tp     addtobuffer     <SID>K9XXXXX     <target SID>     client=XXX pf=TP_DOMAIN_SID.PFL
    u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026.
    2.     Once the text file or cmd file with all the requests are made, place it on to the target system transport directory.
    /usr/sap/Trans/bin.
    3.     Execute this file (./transports.bat) and redirect this file to one more file (error.txt) for checking the errors
    ./transports.bat >> error.txt
    Once all the transports are attached into buffer, you can do the mass import from STMS
    Thanks and Regards
    Purna
    Edited by: purnachender on Mar 17, 2010 7:11 AM

  • Need a click and drag script for multiple layers.

    Hi. I'm realitivly new to Flash and Action Script.
    For a Majour project school asignment i am trying to create an interactive map for a hypothetical theme park, and i'll cut to the chase, i need a script that allows the player to drag the content of two or three layers around the screen upon mouse click, similar to this example:\
    http://www.dreamworld.com.au/content/drw_2008_shopping.asp?name=ParkMap
    I will have a layer for buttons (probably called Buttons) and a layer for the map graphic (Probably called Map), similar to this tutorial:
    http://www.republicofcode.com/tutorials/flash/interactive_map/
    If anyone could produce, or has a script lying around that could do this; i would really apreciate it.
    This assignment has a large impact on my UAI (universities admission index).
    Thanks for your time,
    Pat

    Thanks for your help. I really appreciate it.
    The problem is; this is the script i am using to make the map interactive:
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    var cities:Array = ["muscat", "sohar", "dubai","abu_dhabi"]
    function mover (targetX, targetY){
    currentX = marker_mc._x;
    currentY = marker_mc._y;
    var xTween:Tween = new Tween(marker_mc, "_x", Strong.easeOut, currentX, targetX, .5, true);
    var yTween:Tween = new Tween(marker_mc, "_y", Back.easeOut, currentY, targetY, 1.5, true);
    for (var i = 0; i<cities.length; i++){
    var my_btn = this[cities[i]+"_btn"];
    my_btn.myCity = cities[i];
    my_btn.onRollOver = function() {
    mover( this._x, this._y);
    marker_mc.gotoAndStop(this.myCity);
    And when the buttons are made to be part of a movie clip with the image i am using for the background this script does not work.
    The script is located in a layer called "Actions", if that is of any help at all.
    Any ideas?
    I am sorry if I am being a newsense.
    Thanks

  • Using keywords for multiple folders

    I'm working with a photo archive consisiting of a large number of folders and subfolders. I'm wanting to use keywords to filter my images, but I'm finding that it's not possible unless I select a single folder containing images. Is there a way around this?
    For example can I just select my "Photos" folder and have it filter the images in all of the folders and sub folders contained within. I work at a university so I have folders within the folder "Photos" named things like "Academics" and within "Academics" I have folders for each academic field. Sometimes I'm just looking for a good shot of a professor in a classroom setting and don't really care which academic field it's from and this would be a huge help.

    I'm wanting to use keywords to filter my images, but I'm finding that it's not possible unless I select a single folder containing images. Is there a way around this?
    The quick search field top right in Bridge Window only works on the folder that Bridge is pointed to.
    What might be a better way for you would be the actual Find command (menu Edit/ Find or cmd + F on a Mac).
    This brings up a dialog with more options. At source you can select your main photo folder. Choose one or more criteria and check include subfolders.

  • How to use the same script for multiple buttons

    Hi,
    I've only just started using flash so any help would be great!
    I'm creating a blockbusters type game, I have a grid of 20 buttons and I need  them (individually) to turn blue on click and red on double click. I've managed to do it with the first one using this code;
    var clicked:Boolean = false;
    bn1.addEventListener(MouseEvent.CLICK, bn1click);
    function bn1click(event:MouseEvent):void {
        clicked = true;
        var newColorTransform:ColorTransform = bn1.transform.colorTransform;
        if(clicked){
        newColorTransform.color = 0x064258;
        bn1.transform.colorTransform = newColorTransform;
    bn1.doubleClickEnabled = true;
    var doubleclicked:Boolean = false;
    bn1.addEventListener(MouseEvent.DOUBLE_CLICK, bn1dclick);
    function bn1dclick(event:MouseEvent):void {
        doubleclicked = true;
        var newColorTransform:ColorTransform = bn1.transform.colorTransform;
        if(clicked){
        newColorTransform.color = 0xac1e23;
        bn1.transform.colorTransform = newColorTransform;
    Now I'm having trouble getting the same to work for the rest of the buttons, they are each named bn2, bn3 etc. They need to work individually and remain blue/red once clicked. I've tried listing them as addEventListener commands but not having a great deal of success!
    Any help would be greatly appreciated, thanks!
    Tomo

    One way to do this is to use arrays to keep track of the buttons and their properties.
    var buttonList:Array = new Array(bn1,bn2,bn3);
    var clickedList:Array = new Array();
    var doubleClickedList:Array = new Array();
    //then use a for loop to assign the functions and properties for each button:
    var thisMany:int = buttonList.length; // this will give you the number of items in the buttonList array
    for(var i:int = 0; i<thisMany; i++) {
         buttonList[i].addEventListener(MouseEvent.CLICK,btnClick); // assign the click function to each button
         buttonList[i].addEventListener(MouseEvent.DOUBLE_CLICK,btnDClick); // assign the double click function
         clickedList.push(false);  // add a false value for each button to this array
         doubleClickedList.push(false);
               buttonList[i].doubleClickEnabled = true; // set the double click property for each button
    function btnClick(event:MouseEvent):void {
              var thisButton:int = buttonList.indexOf(event.target);  // figure out which button was clicked as an item in the array
              clickedList[thisButton] = true;  // change the value in the array
               var newColorTransform:ColorTransform = buttonList[thisButton].transform.colorTransform;
        if(clickedList[thisButton]){
        newColorTransform.color = 0x064258;
        buttonList[thisButton].transform.colorTransform = newColorTransform;
    function btnDClick(event:MouseEvent):void {
              var thisButton:int = buttonList.indexOf(event.target);
              doubleClickedList[thisButton] = true;
        var newColorTransform:ColorTransform = buttonList[thisButton].transform.colorTransform;
        if(doubleClickedList[thisButton]){
        newColorTransform.color = 0xac1e23;
        buttonList[thisButton].transform.colorTransform = newColorTransform;
    Now you can have any number of buttons, just add their instance names to the array at the top.

  • Script for multiple insert

    hi,
    I want to insert some 100 records into emp table.
    instead of one by one one row insert, i want to write a script so that it will insert 100 records. like
    empid ename sal
    1000 king a 100
    this is the first record, the second record should be empid should be incremented by 1 i.e 1001 and ename should be king b and salary should be incremented by 100 rs.. like this..to 100 records.
    pls hlp
    regards
    dell

    This one could work:
    WITH t AS (SELECT ROWNUM rn,
                      ' abcdefghijklmnopqrstuvwxyz' char_table
                 FROM all_objects)
    SELECT 1000 + ROWNUM - 1 empid,
           'king ' || char_counter,
           100 + (ROWNUM - 1) * 100 sal
      FROM (SELECT char_counter
              FROM (SELECT SUBSTR(t1.char_table, t1.rn, 1) || SUBSTR(t2.char_table, t2.rn, 1) char_counter
                      FROM t t1,
                           t t2
                     WHERE t1.rn <= 27
                       AND t2.rn <= 27
                       AND t2.rn >  t1.rn
             ORDER BY char_counter
    WHERE ROWNUM <= 100
    ; C.

  • How to use a sap scripts for  multiple languages

    hi gurus
    what are main events in that are used in ALV reports.........
    regards
    baskar

    Hi Bhaskar,
    in the alvs these are the main events.
    1.slis_t_listheader,
    2.slis_t_fieldcat_alv.
    3.slis_t_sortinfo
    4.slis_t_events
    5.slis_t_print_alv.
    6.slis_t_layout_alv.
    and also used these two events.
    1. top-of-page.
    2.top-of-list.

  • Applescript/shells script for capture one

    Hey,
    Wanting a script that will take the last item copied to the clipboard (which will be a folder name), search for it in finder, in "this mac", and then open the folder in Capture One.  It would be great if it were ready to run, so I could launch it each time with a keystroke.  Any one willing to help me on this.  Thanks so much!!
    I know a little applescript, but this one is kind of out of my league, I think, at least.

    Hi,
    You can use this script in an Automator Service (you can assign a keystroke combination to this service).
    If the script find one folder whose name equal the contents of the clipboard, "Capture One" will open this folder.
    if the script finds multiple folders whose name equal the contents of the clipboard, it will do nothing, because I don't know what you want in this case.
    To create a service, you start by selecting New from Automator's File menu.
    You should select the Service option, which is accompanied by a gear icon, clic "Choose" button.
    In your new service, you will see a bar at the top of the Automator flow pane. It has combo boxes that allow you to set filters that establish the conditions in which your service should be made accessible. You want to make a service that receives selected "No Input" and will operate in any application or select an application.
    Add the "Run Shell Script" action
    Copy/paste this script in the action:
    folder=$(mdfind "kMDItemFSName = \"$(pbpaste -Prefer txt)\" && kMDItemContentType = \"public.folder\"")
    if [ -z $folder ];then exit 0;fi ## no match
    tot=$(wc -l <<< "$folder")
    if [ $tot -eq 1 ]; then open -b 'com.phaseone.captureone7' "$folder"; fi
    Replace the bundle identifier in this script --> 'com.phaseone.captureone7'
    To know the bundle identifier of your "Capture One" application, run this AppleScript, copy the result to change the  bundle identifier in the shell script
    tell application "Finder" to get id of (application "Capture One")
    Save the service, quit Automator
    The final step is to assign a keystroke combination to the newly created service.
    Open the System Preferences application and navigate to the Keyboard preference pane, and select the Shortcuts tab.
    From the list on the left of the preference pane, select the Services category.
    A list of the installed services will be displayed to the right.
    Scroll to the last category titled General, and locate the service you just created.
    Double-click to the far right of the service name to activate the keystroke input field and then type the key combination you wish to assign to the service.
    Close the System Preferences application.

Maybe you are looking for