How can I use Automator to search only in folders whose name contains a certain word?

I'm very new to Automator. What I am trying to accomplish is this:
I am using Transmit as my FTP client. I have mounted a server as a disk to my desktop. I am using Automator to try and search this server and open files whose path contains the word "mobile", then open files with the name "order.php" with my HTML editor. There are hundreds other files on this server that have the name "order.php", so I just want to target the ones found in paths with the name "mobile" applied.
Where I get stuck is the "search only in paths that contain the word 'mobile' ".
Please advise.
Thanks.

I'm very new to Automator. What I am trying to accomplish is this:
I am using Transmit as my FTP client. I have mounted a server as a disk to my desktop. I am using Automator to try and search this server and open files whose path contains the word "mobile", then open files with the name "order.php" with my HTML editor. There are hundreds other files on this server that have the name "order.php", so I just want to target the ones found in paths with the name "mobile" applied.
Where I get stuck is the "search only in paths that contain the word 'mobile' ".
Please advise.
Thanks.

Similar Messages

  • How can I use Automator to extract specific Data from a text file?

    I have several hundred text files that contain a bunch of information. I only need six values from each file and ideally I need them as columns in an excel file.
    How can I use Automator to extract specific Data from the text files and either create a new text file or excel file with the info? I have looked all over but can't find a solution. If anyone could please help I would be eternally grateful!!! If there is another, better solution than automator, please let me know!
    Example of File Contents:
    Link Time =
    DD/MMM/YYYY
    Random
    Text
    161 179
    bytes of CODE    memory (+                68 range fill )
    16 789
    bytes of DATA    memory (+    59 absolute )
    1 875
    bytes of XDATA   memory (+ 1 855 absolute )
    90 783
    bytes of FARCODE memory
    What I would like to have as a final file:
    EXCEL COLUMN1
    Column 2
    Column3
    Column4
    Column5
    Column6
    MM/DD/YYYY
    filename1
    161179
    16789
    1875
    90783
    MM/DD/YYYY
    filename2
    xxxxxx
    xxxxx
    xxxx
    xxxxx
    MM/DD/YYYY
    filename3
    xxxxxx
    xxxxx
    xxxx
    xxxxx
    Is this possible? I can't imagine having to go through each and every file one by one. Please help!!!

    Hello
    You may try the following AppleScript script. It will ask you to choose a root folder where to start searching for *.map files and then create a CSV file named "out.csv" on desktop which you may import to Excel.
    set f to (choose folder with prompt "Choose the root folder to start searching")'s POSIX path
    if f ends with "/" then set f to f's text 1 thru -2
    do shell script "/usr/bin/perl -CSDA -w <<'EOF' - " & f's quoted form & " > ~/Desktop/out.csv
    use strict;
    use open IN => ':crlf';
    chdir $ARGV[0] or die qq($!);
    local $/ = qq(\\0);
    my @ff = map {chomp; $_} qx(find . -type f -iname '*.map' -print0);
    local $/ = qq(\\n);
    #     CSV spec
    #     - record separator is CRLF
    #     - field separator is comma
    #     - every field is quoted
    #     - text encoding is UTF-8
    local $\\ = qq(\\015\\012);    # CRLF
    local $, = qq(,);            # COMMA
    # print column header row
    my @dd = ('column 1', 'column 2', 'column 3', 'column 4', 'column 5', 'column 6');
    print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    # print data row per each file
    while (@ff) {
        my $f = shift @ff;    # file path
        if ( ! open(IN, '<', $f) ) {
            warn qq(Failed to open $f: $!);
            next;
        $f =~ s%^.*/%%og;    # file name
        @dd = ('', $f, '', '', '', '');
        while (<IN>) {
            chomp;
            $dd[0] = \"$2/$1/$3\" if m%Link Time\\s+=\\s+([0-9]{2})/([0-9]{2})/([0-9]{4})%o;
            ($dd[2] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of CODE\\s/o;
            ($dd[3] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of DATA\\s/o;
            ($dd[4] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of XDATA\\s/o;
            ($dd[5] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of FARCODE\\s/o;
            last unless grep { /^$/ } @dd;
        close IN;
        print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    EOF
    Hope this may help,
    H

  • Before downloading lion, i want to backup my computer with time machine and a G-DRIVE Slim.  But how can i use time machine to only backup my system once?

    Just wondering, how can i use time machine to only backup my system once? Just this once and not on a weekly basis?

    Upgrade. My three year old Mac Pro and year old MacBook Pro have no problem. Both seem faster.
    And there's your problem reading entirely subjective views on forums, from people that might or might not have decently maintained systems, good operating practices, or whatever.... 
    Strangely, when most companies issue new software, it is because they believe (and believe they have checked) that it is better than the previous version.

  • How can I use the F11 short cut to go to next field in Microsoft Word 2011 on Macbook Air

    How can I use the F11 short cut to go to next field in Microsoft Word 2011 on Macbook Air?

    The default setting for the function keys is that they do OS X functions.
    To get a regular function hold the fn key and then press the function key.
    This action can be reversed in keyboard preferences.

  • How can I use automator to import a .csv file into a an excel file

    I would still like all the import settings that I get if I am using excel to do the process, i.e. going in with the text format instead of the general format. That way my dates don't change

    You'll need to use Applescript in Automator.
    Note:  File extension cannot be CSV (Excel will assume that the file is comma separated), so add an action to copy or rename with extension TXT.
    (You can rename back at end of Workflow is needed)
    The Applescript Action is:
    on run {input, parameters}
         repeat with f in input
              tell application "Microsoft Excel"
                   open text file filename (f as string) data type delimited field info {{1, text format}} other char "|" with use other
              end tell
          end repeat
          eturn input
    end run
    NOTE: This is formating the 1st col to text
    If you need to format the second, then you need to:
      open text file filename (f as string) data type delimited field info {{1, general format}, {2, text format}} other char "|" with use other
    (You'll need to list the 1st col, 2nd col, etc until you get to the col to format as text).  Formats are (from the Applescript Excel Library):
    [field info list] : A list contain parse information for the individual columns of data.
    Formats are general format, text format, MDY format, DMY format, YMD format, MYD format, DYM format, YDM format, skip column.
    Or you can skip using Automator and just use an Applescript App (this is a droplet, just drop the files on the icon, or click to choose files):
    on run
         set fs to choose file with prompt "Select one or more files to open:" default location alias (the path to desktop folder as text) with multiple selections allowed
         proceed(fs)
    end run
    on open fs
         proceed(fs)
    end open
    on proceed(fs)
         repeat with f in fs
              tell application "Microsoft Excel"
                   open text file filename (f as string) data type delimited field info {{1, text format}} other char "|" with use other
               end tell
          end repeat
    end proceed

  • [pavilion g7-2116sr] How can I use amd driver with only integrated graphic?

     Radeon hd 7670m is disabled coz it's broken. Amd driver don't work. Windows use vgasave driver. How can i use amd driver with radeon hd7660g?
    P.S.  Sorry, my english isn't good(

    Hi @Leys 
    I see you are stilll unsuccessful installing the drivers as you get the blue screen.
    Here is a link to Computer Does not Start (Windows 7, Vista, XP) that may help.
    Here is a link to Testing for Hardware Failures (Windows 7, Vista) to determine if your graphic card is defective.
    If the graphic card fails, here is a link to the HP Pavilion g7 Notebook PC Maintenance and Service Guide. Please note page 9 or chapter 1 page 9 for a list of recommended replacement graphic cards.
    If the graphic card passes you may wish to consider doing a restore back to a known good time or a full recovery back to factory.
    Using Microsoft System Restore (Windows 7)
    Performing an HP system recovery (Windows 7)
    During the recovery process there is an option to backup your personal files to prevent data loss.  If you have not done one yet I suggest you do one now.
    Restoring Files that were Backed Up Using HP Recovery Manager (Windows 7)
    At any time you may wish to contact HP support for assistance.
    Please call our technical support at 800 474 6836. If you live outside the US/Canada Region, please click the link below to get a support number for your region.
    World Wide Phone Support
    Good Luck!
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • How can I use automator to copy and paste excel content to a new empty document?

    Hi,
    I would like to copy and paste the content from an excel file to another empty new document using automator, which I created a workflow like below
    get specific finder item
    open excel workbook
    select cell from excel workbook (all content)
    obtain selected content from workbook
    copy to pasteboard the content of excel workbook
    close the excel workbook
    create new excel workbook
    paste copyboard content to excel workbook
    can anyone kindly suggest what's wrong with this workflow?
    Thank you so much
    Eddy
    (i know this is a number place but I couldn't find any excel seciton sorry guys...)

    now it only does one file at a time, whereas I would like to do multiple files simultaneously.
    If you try a search for "loop Automator" and also "folder actions" you may find some usable pointers on how to do that.  The first example on this page looks promising.
    SG

  • How can I use ONE Text search iView to event/affect mutliple Result Sets?

    hello everyone,
    i have a special situation in which i have 6 flat tables in my repository which all have a common field called Location ID (which is a lookup flat to the Locations table).
    i am trying to build a page with a free-form text search iView on Table #1 (search field = Location ID).  when I execute the search, the result set for Table #1 is properly updated, but how do I also get Result Set iViews for Tables #2-6 to also react to the event from Text Search for Table #1 so that they are updated?
    i don't want to have to build 6 different text search iViews (one for each table).  i just want to use ONE text search iView for all the different result set tables.  but, in the documentation and iView properties, the text search iView doesn't have any eventing.
    if you have any suggestions, please help.
    many thanks in advance,
    mm

    hello Donna,
    that should not be a problem, since you are detailw with result sets and detail iviews because custom eventing can be defined for those iviews.
    Yes, it says "no records" found because an active search and record selection havent' been performed for it (only your main table does).
    So, yes, define a custom event, and pass the appropriate parameters and you should be fine.
    Creating a custom event between a Result Set iView and an Item Details iView is easy and works. I have done it.
    See page 35 of the Portal Content Development Guide for a step-by-step example, which is what I used.
    For my particular situation, the problem I'm having is that I want the Search Text iView's event (i.e., when the Submit button is pressed) to be published to multiple iViews, all with different tables.  Those tables all share some common fields, which is what the Search iView has, so I'd like to pass the search critera to all of the iViews.
    -mm

  • How can I use a different search path for FlexRIO IO modules?

    I want to use an IO module that is outside of the LabVIEW tree, but it seems like LabVIEW only searches in shared/flexrio/IO modules, and I can't figure out how to create symlinks in windows.
    Is there a variable I can set somewhere to include other search directories for the IO modules?
    //Olof
    Solved!
    Go to Solution.

    Hello Olaf,
    There are two locations on your Windows computer that are searched for FlexRIO adapter module support files.  The first is the Program Files directory you have indicated in your post; this directory holds the support files for NI manufactured adapter modules.  However, there is another directory that can be used for the location of any non-NI manufactured adapter modules.  For Windows XP this location is: C:\Documents and Settings\All Users\Documents\National Instruments\FlexRIO\IO Modules.  If you are attempting to install support for a non-NI manufactured adapter module, please ensure that you have installed all of the adapter module support files into this folder. 
    If you would like more information on this as it pertains to a custom adapter module development, please email the support email address listed in your Module Development Kit Manual.  This email address will give you direct access to the NI FlexRIO R&D team for support as indicated here.  If you want to discuss adding the ability to search other directories for adapter module support (other than the two listed above), please email the MDK support email address. 
    Regards,
    Browning G
    FlexRIO R&D

  • How can I use automator to open terminal change directory run a python script?

    Hi all,
    I dont really ever use automator - which may be my big problem - and I am trying to make an apllication that seems fairly simple in theroy. I want something that will lunch terminal, cd to the place where my python script lives and then run it. I have tried a number of suggested ways and can get the terminal to open and the directory to change but cant figure out how to run the script. This is my workflow if i did it manually each time
    - open terminal
    - type cd "the place where my file lives"
    - type python uploadr.py -d
    I can get terminal to open then cd to the right place but cant get the "python uploadr.py -d" to run without an error.
    any help would be very appricated
    thanks!!!
    J

    this is the script I got closest with - I know its something to do with breaking those two commands up but i just dont know how to do it
    on run {input, parameters}
              tell application "Terminal"
      activate
                        if (the (count of the window) = 0) or ¬
                                  (the busy of window 1 = true) then
                                  tell application "System Events"
      keystroke "n" using command down
                                  end tell
                        end if
                        do script "cd /Users/behole/Desktop/FlickrUpload/" & "python uploadr.py -d" in window 1
              end tell
              return input
    end run
    this is the error I get in terminal after I run it
    Last login: Mon Jul 23 15:37:17 on ttys000
    be-holes-MacBook-Pro:~ behole$ cd /Users/behole/Desktop/FlickrUpload/python uploadr.py -d
    -bash: cd: /Users/behole/Desktop/FlickrUpload/python: No such file or directory
    be-holes-MacBook-Pro:~ behole$

  • How can i use automator to change my browsers home page

    Hello there,
    I am a junior web developer currently using a macbook, i have wamp server installed on my machine for testing the code that i produce.
    Currently i have 2 browsers on my machine firefox and safari. I would like to create a script that would change my homepage to localhost only when wamp server is running. I am guessing this can be done with automator but i just don't know how.
    If anyone has any ideas that would be sweet!
    Peace

    If the files are in one folder, I'd change them with TextWrangler.
    First, copy the folder with the 12-point files. Work on the copy folder.
    Open TW
    Search > Multi-File Search …
    --Find: fs24  (i.e., an RTF code that indicates a 12-point font)
    --Replace: fs48  (i.e., an RTF code that indicates a 24-point font)
    --Search in:  Other: (target the copy folder)
    --Replace All
    Follow the dialog to Find & Replace All Matches:
    --Save to disk
    (There's no need to use the options to Leave open, Confirm before saving, or Show results.)
    --Proceed
    Quick and dirty but ought to work unless you actually use the string "fs24" somewhere in a document--and if you do, you do still have the original 12-point files.

  • How can I use Automator to toggle the Function Keys?

    I am trying to create a Automated process to toggle the Function Keys on my keyboard. This is because I use several programs, including After Effects, which use the F1-12 keys, but when I am not using that program I commonly use the Apple-defined shortcuts on the keyboard. I have a full-sized keyboard, hence no Fn key. So that's out right away – I've read several comments on this topic where people suggested that this is the ONLY option. I refuse to beleive that.
    Automator contains a "Watch Me Do" feature, which I have tried to use to record this process. Problem is, it never clicks the right object. If I record clicking the dock, the magnification (I suspect) throws off the virtual-controlled mouse and picks the wrong object. If I record the Apple Menu route, it gets it about 1/2 the time.
    I think what I'm really looking for is a console command I can feed into the Terminal which toggles the keys. It seems to be that this HAS to be an option, even if it is more than one line of commands. I believe if I can feed this process into Automator, it would work.
    Any ideas?
    Thanks in advance, Mac Geniuses!

    iKey lets you define function keys per application. You seem to want to turn on & off the defined apple keys.  Not sure if these keyboard re-mappers will do the trick.
    Here is my other most favored application. Of course, I haven't checked these out in newer OS's. I'm a Tiger man myself.
    iKey is a front end program that simulates typing and mouse movements. I use iKey to remap the Function keys.
    "iKey is an automation utility, a program that creates shortcuts to accomplish repetitive tasks. In essence, an iKey shortcut is a little program in its own right, but you don't need to know the first thing about programming to create an iKey shortcut. All you have to do is put together three necessary parts of a shortcut: One or more commands that give the shortcut its functionality, a context in which it runs, and a launcher that defines how the shortcut is activated."
    http://www.scriptsoftware.com/ikey/
    iKey  has a little more function then the previous free version called youpi key. For many years, I used youpi key before switching to iKey.  It works fairly well for me in MAC OS 10.4 although not officially supported.  The youpi key download is hard to find & no longer here.
    http://www.versiontracker.com/dyn/moreinfo/macosx/11485&vid=75326
    ( Send me a message for a copy of youpi  key. )
    *Examples:*
    I have the common programs that I use assigned to function keys. I have F4 assigned to Firefox. When I want to start FireFox, I press F4. When I want to switch to firefox, I press F4! Starting & switching to an application in Mac OS are the same thing in Mac OS.
    Here is an example of to assign volumn control to a function key.
    http://discussions.apple.com/message.jspa?messageID=10361085#10361085
    Here is my script for listing my application folder. I have it assigned to function-key 6.
    tell application "Finder"
       open folder "Applications" of startup disk
       select Finder window 1
       set bounds of Finder window 1 to {-3, 44, 691, 545}
       --set position of Finder window 1 to {33, 44}
       set position of Finder window 1 to {60, 45}
       activate
    end tell
    The second portion of this script was generated in the script editor record mode. After I recorded the script and did some editing, I copy the script to ikey/youpi key.
    Full Key Codes
    http://download.cnet.com/Full-Key-Codes/3000-2094_4-44175.html
    Spark
    "Spark is a powerful, and easy Shortcuts manager. With Spark you can create Hot Keys to launch applications and documents, execute AppleScript, command iTunes, and more... You can also export and import your Hot Keys library, or save it in HTML format to print it. Spark is free, so use it without moderation!"
    http://www.versiontracker.com/dyn/moreinfo/macosx/22675
    Mac OS X remap or rename keyboard keys
    by vivek
    So how do you remap or rename keyboard keys under Mac OS X?
    Simply use DoubleCommand software.  It is a free program
    http://theos.in/apple/download-doublecommand-to-remap-keyboard-keys/
    Keyboard Maestro is a powerful macro program for Mac OS X (including Tiger and Leopard) which has received glowing reviews. Keyboard Maestro will take your Macintosh experience to a new level in “Ease of Use”. With Keyboard Maestro you can design a custom action sequence with your own shortcuts and use them at any time, you can navigate through running applications and open windows with Program Switcher, and you can work with an unlimited number of clipboards - all by pressing simple keystrokes.
    http://www.keyboardmaestro.com/main/
    "Spark is a powerful, and easy Shortcuts manager. With Spark you can create Hot Keys to launch applications and documents, execute AppleScript, command iTunes, and more... You can also export and import your Hot Keys library, or save it in HTML format to print it. Spark is free, so use it without moderation"
    http://www.versiontracker.com/dyn/moreinfo/macosx/22675

  • How can I use Automator or AppleScript to get text from a web page and paste it in execl?

    I don't know how to make scripts or complexed automator workflows... that's why I'm asking.
    I'm trying to make a simple app or script to ask me what text to extract from a web page, like name, address and phone number of a web page and paste each one of these data in the righ cell of excel.
    I was thinking to promt a request from automator or an applescript to ask me which text to extract from the page or to look throught the HTML of the page to search for specific html tags, from which extracting text and then importing it, or paste it to the specified execl cell. Name in the name cell, address in the address cell and so on.
    Can somebody help me to make this script?
    If you know an alternative, like a software that already do this or another language to use, please tell.

    Try holding down the alt key as you mark the text to be copied. You can then copy columns to table text.

  • How can I use Automator to open and save Word docs with links?

    Hi-
    I'm having trouble building a Workflow to open and save Word docs with links.
    My Workflow so far:
    1. Get Finder items
    2. Copy Finder items (to new folder)
    3. Rename selected items
    4. Open selected items (Word docs)
    Three problems occur.
    The first is a Word 2004 problem -- I can't get the warning "This document has links in it; do you want to open it with/without updating the links" to go away (Unilke the Macro warning toggle capability, there is nothing in the Preferences for Word 2004 that addresses the links warning, as far as I can tell; any insight you can shed on this would be terrific.)
    The second problem happens with Automator: if I manually accept the update of the first document's links, Automator opens that document but then halts completely, even though I've instructed it to open multiple documents.
    The third problem I have is that there's no Finder action in Automator that allows me to save the document that's now open (as far as I can see).
    Any suggestions for how to fix? If I can get this to work, and scheduled in iCal, it will be an unbelievable time saver.
    Thanks,
    Jeremy
    PowerPC G5   Mac OS X (10.4.6)  

    Hi there Jeremy,
    to do this you are going to have to add in some Run AppleScript steps...
    These will rely on GUI Scripting. So first you need to activate GUI Scripting.
    Now we need to add in a Run AppleScript action to the end of your workflow...
    This will replace your current number 4 in the workflow (Open Selected...)
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">on run {input, parameters}
    set allItems to every item of input
    repeat with currItem in allItems
    tell application "TextWrangler"
    open currItem
    end tell
    activate application "TextWrangler"
    tell application "System Events"
    tell process "TextWrangler"
    delay 2
    --when the Word document is opened I have told it to press okay !
    --I don't know what key you want it to press in the dialog box
    keystroke return
    delay 2
    --save the doc
    keystroke "s" using command down
    delay 5
    --close the doc
    keystroke "w" using command down
    end tell
    end tell
    end repeat
    return input
    end run</pre>
    The above script should open each Word Document, press a button in the dialog box then do a save and then close the doc...then loop through the rest of them.
    You need to replace the name Text Wrangler with Microsoft Word (or whatever it is called!), I don't have it on my Mac.
    You will have to let me know what button needs pressing in the first dialog, if it isn't the 'highlighted ' one then we will have to amend the script...
    regards
    Ric

  • How can I use Automator to extract information from the body of an email sent from a web form.. and the import it into Highrise?

    I'm assuming that Automator is the way to go. I've never used it before but from research it seems to be the way to go. Also, I'm not good at programming at all.
    Here's a typical email...
    From:      [email protected]
         Subject:      Enquiry for Property ID: 408777039, 2 Grey Avenue, Manningham, SA 5086, Listing Agent
         Date:      18 September 2013 8:33:51 PM ACST
         To:      Joe Jope
         Reply-To:   [email protected]
    You have received a new lead from realestate.com.au for
    Property id: 408587036
    Property address: 2 Grey Avenue, Manningham, SA 5086
    Property URL: www.realestate.com.au/404387039
    User Details:
    Name: John Bon Jovi
    Email: [email protected]
    Phone: 0422645633
    I would like to: buy this house
    Comments: Please give me a call.
    I have several hundred of these emails and I want to extract the information and then save it into my CRM which is Highrise (https://highrisehq.com). If it's too difficult to get it directly into Highrise then I'm aslo happy to extract the info into excel and the import into Highrise. However I do not want to have to run through that proceedure for every single email.
    I'd really like some help on how to get Automator to do this for me. Or if not Automator.. any other suggestions?
    Thanks.
    John

    Hello
    You may try the following AppleScript script. It will ask you to choose a root folder where to start searching for *.map files and then create a CSV file named "out.csv" on desktop which you may import to Excel.
    set f to (choose folder with prompt "Choose the root folder to start searching")'s POSIX path
    if f ends with "/" then set f to f's text 1 thru -2
    do shell script "/usr/bin/perl -CSDA -w <<'EOF' - " & f's quoted form & " > ~/Desktop/out.csv
    use strict;
    use open IN => ':crlf';
    chdir $ARGV[0] or die qq($!);
    local $/ = qq(\\0);
    my @ff = map {chomp; $_} qx(find . -type f -iname '*.map' -print0);
    local $/ = qq(\\n);
    #     CSV spec
    #     - record separator is CRLF
    #     - field separator is comma
    #     - every field is quoted
    #     - text encoding is UTF-8
    local $\\ = qq(\\015\\012);    # CRLF
    local $, = qq(,);            # COMMA
    # print column header row
    my @dd = ('column 1', 'column 2', 'column 3', 'column 4', 'column 5', 'column 6');
    print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    # print data row per each file
    while (@ff) {
        my $f = shift @ff;    # file path
        if ( ! open(IN, '<', $f) ) {
            warn qq(Failed to open $f: $!);
            next;
        $f =~ s%^.*/%%og;    # file name
        @dd = ('', $f, '', '', '', '');
        while (<IN>) {
            chomp;
            $dd[0] = \"$2/$1/$3\" if m%Link Time\\s+=\\s+([0-9]{2})/([0-9]{2})/([0-9]{4})%o;
            ($dd[2] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of CODE\\s/o;
            ($dd[3] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of DATA\\s/o;
            ($dd[4] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of XDATA\\s/o;
            ($dd[5] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of FARCODE\\s/o;
            last unless grep { /^$/ } @dd;
        close IN;
        print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    EOF
    Hope this may help,
    H

Maybe you are looking for