Is it possible to do it with automator?

Hi.
I have 4500 of txt files. Content of the files is the same and somhere in the middle of the text in every file is located a word (lets say its FRAME) and I want to replace this word with the name of the specific file. Shortly I want to put file's name into its content in specific place and with this action replace a word that is the same in all of 4500 files. Any ides?

You'll probably be better off doing that with a shell script. Something like this should get you started..
#!/bin/sh
for i in *.txt
do
sed "s/FRAME/$i/g" < $i > $i.renamed
done
iMac   Mac OS X (10.4.9)  

Similar Messages

  • Possible to change mouse sensitivity with automator?

    For regular computing, I use my magic mouse. For gaming, I use a different mouse with more controls.
    Each time I switch between mice, I have to change the mouse sensitivity under system preferences. I'd like to autmoate this with a hot key. Possible to do with automator?

    OK, found a nifty applescript for this. Just change the 5 in the first line to 0-9, depending on what you want to set the mouse sensitivity to be. I created another script which increases mouse sensitivity. Then I created a hotkey combination to change my mouse sensitivity settings very quickly based on which mouse I'm using.
    If you don't know how to set this script up, follow the instructions in this helpful comment here: https://discussions.apple.com/thread/2488007?start=0&tstart=0. But instead of having the application run in just iTunes, as the comment suggests, have it run in "all applications."
    Here's the script:
    set trackingValue to 5
    --Open and activate System Preferences
    tell application "System Preferences" to activate
    --Attempt to change settings using System Events
    tell application "System Events"
        tell process "System Preferences"
             try
                  --Open the "Keyboard & Mouse" pane
                  click menu item "Mouse" of menu "View" of menu bar 1
                  delay 2
                  set value of slider "Tracking Speed" of window "Mouse" to trackingValue
                  --end tell
             on error theError
                  --An error occured
                  display dialog ("Sorry, an error occured while altering Keyboard and Mouse settings:" & return & theError) buttons "OK" default button "OK"
             end try
        end tell
    end tell

  • How do I create an Application with Automator that will open files in Photoshop Elements 11 and run an action?

    Here's what I'd really like the Script to do when I select one main folder:
    Look through all the subfolders, find all the PNG files and convert them to TIFFs, replacing the original PNG files.
    Open the converted TIFF files in PSE 11.
    Run an action on them in PSE 11 (which I already created that adds a white fill layer below the TIFF file.)
    Save each file in their original location and Close each file.
    Import them into LR.
    Anybody?  Bueller?  Bueller?
    If that's not possible, I'd love an Automator action that can convert the PNG files to TIFFs that can be viewed in LR 4.4.  If I convert them in PSE 11, LR can view them, but if I convert them using Automator, LR cannot.
    Thanks so much for any help you can provide.
    -Jen

    LabVIEW 7 added a property to get a command line argument. For older versions see http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DA5B56A4E034080020E74861.
    I'm not sure I understand you problem with the Run button. If you set the execution mode to Run When Opened from VI Properties, it should execute once whenever it's called. I think that when building an executable, it changes the property to this if it's not already set. If the application does not have this set, it will not be running at all. I'm assuming that you are talking about the Run button on the toolbar and not a run Boolean that you've created on the front panel.
    Since you have the app builder, your other option is to create a DLL. If you can call a DLL in Matlab, then that would probably be simpler.
    Message Edited by Dennis Knutson on 11-28-2005 02:46 PM

  • Is it possible to connect indesign with database/OOD...

    Hello fellow Indesign user,
    Not sure if this question belongs here or in scripting...
    I'm just a moderate user in ID CS4 and I got this daunting task to find/invest a way to use Indesign (our existing layout software) to create "brochures/instruction manuals" using databases or OOD. Meanings, use a template, add a code that corresponds to a similar code with pre-defined data-entity in a database/OOD, and automatically add the text/pictures from the database/OOD.
    We are not talking about addresses or simple things like that, but brochures and instruction manuals in different languages with different or similar operation for each machine. Some instructions are the same and some are not. Get my drift?
    We are using ID Cs4 in the company right now, not the smartest tool to use when producing 25 different brochures/technical manuals with different languages. Changing one content in one manual, meaning we have to change all 25 brochures/manuals.... manually...
    Many of you may think -"why did you start ID in the first place". The answer: I don't know, I wasn't here then... It is not until now they discovered -"Oh, we need a new system… " and guess who got the task to evaluate it…
    I need to know if it is possible and to what extent we can use ID with database or an OOD-system to retrieve data (mostly custom data with bulletin, font, size, pictures, etc).
    Articles, links and other information would be very helpful….
    Thanks!
    //Vincent

    What kind TM exist out there and is it possible to integrate it with ID? (I can probably check Wikipedia, but it feels correct to ask the right question to ask to the right person here. How does your firm manage multilingual contents in ID? You gotto have the same problem as I do, at least to some extent…
    How is it even possible to have an automated system and still have that flexible design freedom in ID..? Many questions here…
    To invest a complete new system is not an option anymore. I made some calculation and plenty of phone calls. The figures does not look good at all… it’s simply not worth the time and money. So what are the options, if we keep ID in the firm?
    Well, I should have had lots of time to answer your questions this  evening, but it turns out that we're both out of luck. I'll cover a few  things quickly to give you some Google-fodder:
    1) Okay, I won't suggest expensive commercial solutions.
    2) Read up about how to flow XML content into and out of ID
        2b) Store your content in the DB of your choice, spit out XML, and then update your INDDs with it.
    3) Think about an open-source TM app like OmegaT
    4) Do you do all of your translations in-house? If not, ask your suppliers how they work.
    5) But really, if you don't have a completely obsessive person in charge of making sure everything is up to date, you're asking for trouble. I'm reminded of a quote by Edward Tufte who was talking about project management; I can't remember the quote, but the idea boiled down to the fact that you can do just as good a job with whiteboards as you can with databases. At least right now you know that you haven't kept all versions up to date... if you were housing all your content in a database, then the update process is somewhat hidden from you, and you wouldn't know if something broke unlesss you caught it in QA. If you're not doing all the updates... then you can't do good QA.This is a recipe for disaster.
       5b) Establish a good workflow with whatever tools you have (database, whiteboards, little strings with knots tied in 'em, notches carved in the thighbones of extinct birds of prey, etc.) and give someone the power to sanction/punish/fire people who disobey workflow rules. I am not kidding.
    I will make more useful suggestions (suggestions more useful than 5b, at any rate) in the near future.

  • E-Mail to Fax with Automator

    I would like to create a script that will automatically take e-mails received on a certain account in Mail.app and fax them out to a known number, using the print-to-fax functionality that is built into Tiger.
    Is this something that would be possible to do with Automator, or if not Automator is it something that could be done with AppleScript? Does such a script already exist?

    We are talking about the Mail app, right? In the Mail menubar, click on Window and then Previous Recipients:
    That eliminates the previous recipients. If you are talking about the suggestions because there are 10 people with the name 'Steve' in your Contacts, then I do not know how to eliminate those unless you change the name slightly or wait until you type the last name or some other differentiator.

  • Is this feasible with Automator?

    I am tasked with the project of making it possible for Mac users in an office to create several folders and documents automatically, at the click of a mouse, if you will. Can this be done with Automator? If not, any recommendations on how to make this happen?
    Example:
    Law office has a new client. By simple act of automation, it would be great if a folder was created with the clients' name, followed by a subfolders, with boiler plate documents inside them that are used in every case, such as contracts, introductory letters, motions, etc. Even more ideal, it would be great to have a checklist of all the steps that is generated, and even more ideal, would be great if the user could choose the type of case, and have folders and letters generated based on the choice of which kind of case.
    Is this possible?

    It is possible - a service can be used to run a workflow with folders selected in a Finder window.  There are a few ways to create the folder structures, one would be to use a previously created template and copy that to the new client folder - I have written an Automator action that does just that:
    The Copy Folder Structure action can be downloaded here.

  • Itunes with automator?

    I like to have all of my songs in itunes in the same format. i like them all in lowercase letters, just because i'm anal. and i've actually fell well behind with this. is it possible to have the computer do this for me automagically, possibly with automator. i'm skeptical because doing this is not as easy as a menu option. i have change all of them manually.
    any help? please

    Yes, you can. Automator has an action called "Change Case of Song Names". It will change them to either uppercase, lowercase, or title case.
    1) Drag "Ask For Songs" into the empty space on the right first, then "Get Selected iTunes Items", and then "Change Case of Song Names"
    3) Choose your case type (in section #3) from the pop-up menu.
    4) Click "Run" in the top right of the toolbar. Highlight the songs you want to change.
    There you have it.

  • Help with Automator - create workflow to move files to dated folders

    If anyone could help me, I'd greatly appreciate it.
    I have no idea how to use Automator, but I think it'd be perfect for this job.
    I want to take a folder of files (images) and move them to separate folders which are named for the dates that the files were created on. So, for instance, I have a folder of ten images. Five were created on November 1st and the other five were created on November 2nd. I want to create two folders on the desktop with the dates in the name (like 20071101 & 20071102) and take the five images from 11/1 and move them to the 20071101 folder and the five images from 11/2 and move them to the 20071102 folder (sorry for the run-on sentence).
    Is this possible with Automator? Is this an easy thing to do?
    Thanks,
    Antonio

    I'm trying to do something very similar. I need to open an image sequence in QuickTime and export them to a mov file. Easy enough, but I would also like to create a new Finder folder and name it with today's date and save the mov file to that new folder.
    What frustrates me is that it doesn't appear you can name Finder folders in any way other than using the Rename Folder action. I was hoping to use today's date that I had copied to the clipboard. Also, I have no experience using AppleScript, so hoping to avoid anything advanced there.

  • Is it possible to use FaceTime With my two IPad With the same email address? I Will Google to china next month And i would like to communicate With my kids.

    IS it possible to use FaceTime With my two IPad That has the same address? I Will Go to China soon And i would like to discuss With my kids from there i.e. One IPad in China And one in Montréal.

    No, this is not possible.  It would be like dialing your own phone number.  You must verify an additional new email address for your second iPad.  See the following link which will tell you how to do this.  You will need to add this new address to Facetime app in one of your iPads.
    http://support.apple.com/kb/HE68

  • Is it possible to use variable with interval in BEX for filter or pl funct.

    Hi,
    we have filters in which variables with interval are being used, as well as planning functions in which a variable with interval should be used.
    In the planning modeler everythings works fine. But I have problems to fill values for these type of variables. The error message "specify a value for variable xxx " is always generated. I know it is possible to do this (with VAR_LOW & VAR_HIGH instead of VAR_VALUE).
    Can someone please help?
    regards
    D

    Hello Dries,
    yes, it's possible. You have to use VAR_VALUE_LOW and VAR_VALUE_HIGH.
    Regards,
    Marc
    SAP NetWeaver RIG

  • What are the different types of analytic techniques possible in SAP HANA with the examples?

    Hello Gurus,
    Please provide the information on what are the different types of Analytic techniques possible in SAP HANA with examples.
    I would want to know in category of Predictive analysis ,Advance statistical analysis ,segmentation analysis ,data reduction techniques and forecast techniques
    Which Analytic techniques are possible in SAP HANA?
    Thanks and Regards
    Sushma C Narasimhamurthy

    Hi Sushma,
    You can download the user guide here:
    http://www.google.com.au/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CFcQFjAB&url=http%3A%2F%2Fhelp.sap.com%2Fbusinessobject%2Fproduct_guides%2FSBOpa10%2Fen%2Fpa_user_en.pdf&ei=NMgHUOOtIcSziQfqupyeBA&usg=AFQjCNG10eovyZvNOJneT-l6J7fk0KMQ1Q&sig2=l56CSxtyr_heE1WlhfTdZQ
    It has a list of the algorithms, which are pretty disappointing, I must say. No Random Forests? No ensembling methods? Given that it's using R algorithms, I must say this is a missed opportunity to beat products like SPSS and SAS at their own game. If SAP were to include this functionality, they would be the only BI vendor capable of having a serious predictive tool integrated with the rest of the platform.... but this looks pretty weak.
    I can only hope a later release will remedy this - or maybe the SDK will allow me to create what I need.
    As things stand, I could built a random forest using this tool, but I would have to use a lot of hardcoded SQL to make it happen. And if I wanted to go down that road, I could use the algorithms that come with the Microsoft/Oracle software.
    Please let me be wrong........

  • How can I introduce text in a web page with automator?

    I want to create a workflow with automator for httpS web pages in which I have to introduce the user and password. how can I do?

    Try this:
    set the clipboard to item 1 of (get name of (static text of group 104 of UI element 1 of scroll area 1 of group 4 of window "Account Summary" of application process "Safari"))
    (10906)

  • Is it possible to Integrate dos with Java to create a sample compiler?

    Is it possible to Integrate dos with Java to create a sample compiler, or do I have to write the compiler from scratch? In theory, I would like to have users enter sample code in a java text field, hit a java button that would compile/run the code, by calling a dos command prompt that would run it, and display any error messages back to the java text field. Does anyone know if this is possible? Any help would be greatly appreciated.
    Tflav23

    There is a Compiler class you might be able to use also:
    C:\jdk1.3.1_01\docs\api\java\lang\Compiler.html
    So perhaps there is no need to create a process to compile code. But I don't know if you can get information about compiler errors.

  • Is it possible to create graph with in the table / Pivote table.

    Is it possible to create graph with in the table / Pivote table.
    Emp# Emp Name % Bonus Pay Amt
    111 AAA $28276
    222 BBB $78878
    In the place of Bonus I have to display Bar (Chart) instead of number.
    Is it possible in OBIEE? I know we can display chart and table next by next but my user want display just like above.
    Please help me on this issue
    Thank you very much for your time

    hi,
    it is better for 2 different questions,make 2 differents threads...
    You used the 2ond solution(google???),put in the dashboard...html enabled...and check your pdf again.
    Moreover,printing pdf with answer is discouraged...always prefer Xml Publisher.
    Last,there are 2 fst files which configure the *.pdf files , check them,
    http://obiee101.blogspot.com/2008/09/obiee-pdf-controls-fst-files.html
    hope i helped....
    http://greekoraclebi.blogspot.com/
    ///////////////////////////////////////

  • HT2488 Find/Replace text in document with automator: any suggestions?

    I'm looking to replace a number of unique html tags for a number of documents: is there any way to do this without going through the documents one-by-one, tag-by-tag? I would imagine I might be able to do something with automator, but I'm open to any other suggestions. I have some knowledge of html, but that's about it.

    So I take it this is something you do regularly, not something that needs to get done once?  if it were a oneshot operation it would be simpler to use TextWrangler.
    For repeated use, the simplest approach is to run through the files and apply text item delimiters to each tag:
    set indesignTags to {"idtag1", "idtag2", "idtag3"}
    set htmlEquivs to {"htmltag1", "htmltag2", "htmltag3"}
    set theFiles to choose file with prompt "Choose indesign files" with multiple selections allowed
    repeat with aFile in theFiles
      -- get file text
              set fileText to read aFile
      -- swap tags
              repeat with i from 1 to count of indesignTags
      -- swap lead tags
                        set fileTextBits to tid({input:fileText, delim:"<" & item i of indesignTags})
                        set fileText to tid({input:fileTextBits, delim:"<" & item i of htmlEquivs})
      -- swap trailing tags
                        set fileTextBits to tid({input:fileText, delim:"</" & item i of indesignTags})
                        set fileText to tid({input:fileTextBits, delim:"</" & item i of htmlEquivs})
              end repeat
      -- make new file path with html extension
              set oldFilePath to POSIX path of aFile
              set filePathBits to tid({input:oldFilePath, delim:"."})
              set last item of fileNameBits to "html"
              set newFilePath to tid({input:filePathBits, delim:"."})
      -- save at new file path
              set fp to open for access newFilePath with write permission
      write fileText to fp
      close access fp
    end repeat
    on tid({input:input, delim:delim})
      -- handler for text items
              set {oldTID, my text item delimiters} to {my text item delimiters, delim}
              if class of input is list then
                        set output to input as text
              else
                        set output to text items of input
              end if
              set my text item delimiters to oldTID
              return output
    end tid
    This will work if the indesign tags are unique and there is no complex syntax.  It might fail if tags have overlapping names (e.g. "<bl>" and "<blue>") or if there's any irregular notation.  If you need more sophisticated handling you'll have to use regular expressions.  In that case, download and install the Satimage osax from this page, and use the following (similar) code:
    set indesignTags to {"idtag1", "idtag2", "idtag3"}
    set htmlEquivs to {"htmltag1", "htmltag2", "htmltag3"}
    -- set up regular expressions change lists
    set findList to {}
    set changeList to {}
    repeat with i from 1 to count of indesignTags
              set end of findList to "(</?)" & item i of indesignTags & "(?![[:alnum:]])"
              set end of changeList to "\\1" & item i of htmlEquivs
    end repeat
    set theFiles to choose file with prompt "Choose indesign files" with multiple selections allowed
    repeat with aFile in theFiles
      -- get file text
              set fileText to read aFile
      -- swap tags - needs Satimage osax
              set fileText to change findList into changeList in fileText with regexp
      -- make new file path with html extension - needs Satimage osax
              set oldFilePath to POSIX path of aFile
              set newFilePath to change "\\.[^.]+$" into ".html" in oldFilePath with regexp
      -- save at new file path
              set fp to open for access newFilePath with write permission
      write fileText to fp
      close access fp
    end repeat
    Message was edited by: twtwtw - I made an error in the second regular expression.  should be "\\.[^.]+$", not "\\..*$".  fixed in text.

Maybe you are looking for

  • Finding changes in SAP tables

    Hi, I have problem with SAP - Cognos interface. It functions like an ABAP program that generates a file from spec. fields of some SAP tables like BKPF, BSEG, BSID, BSIK, etc. And this is all OK, but problem is that report always selects ALL data, and

  • Question about using new battery in old Powerbook

    I have a pre-intel Powerbook G4, and the battery is pretty much toast (lasts about 15 minutes now). I have ordered a new battery for it, and I have this question about using it: Am I smarter to keep the new strong battery out of the PB most days (as

  • IPhoto '09 Book

    I had to use Time Machine to re-install my photo library since I made a mistake with one of the photos by cropping it for another purpose, which altered the book I had made awhile back. After re-installing the library and getting the photo back to it

  • How to get rid of ios6 file downloaded to my iphone?

    My iphone4 downloaded ios6 two days ago, as far as I know without my intervention (I may have accidentally given order for that...). I've noticed an icon badge with '1' on settings and with surprise I found ios6 had been downloaded and was ready to i

  • Photoshop CS5.1 Closes when I open a new file

    I open Photoshop, everything starts up fine, I click File>Open or File>New, nothing happens for a moment or two, then It says Adobe Photoshop CS5.1 has stopped working. I'm running Windows 7. I searched around and I think this would be the informatio