Batch process text document with automator

Hi all
i would like to create a workflow with automator that look like that
1)open text file with textedit
2)"find and replace"
3)Save
4)Close
my workflow works if i select one textfile but i didnt manage to make it do that on more than one text at the same time which is what i would like
please help
thanks
p

Hi all
i would like to create a workflow with automator that look like that
1)open text file with textedit
2)"find and replace"
3)Save
4)Close
my workflow works if i select one textfile but i didnt manage to make it do that on more than one text at the same time which is what i would like
please help
thanks
p

Similar Messages

  • 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.

  • Acrobat 9 Pro - previous output settings in a batch process keep interfering with new one

    I created a batch process for pdf/a conversion.  For the output setting, I unchecked the "overwrite" box and added a suffix to the file name.
    When I deleted one and recreated a different one, it is still appending that old suffix to the file name and overwriting the old file.
    Even though I uninstalled and reinstalled the software (Acrobat 9 Pro), the batch processes I had created before were still there, hence the problem remains.
    How do I delete these files so I can start over?  Tech support didn't solve the problem and having a hard time getting through.
    Doran

    Hi,
    User created *.sequ files are stored:
    Vista –
    C:\Users\<user name>\AppData\Roaming\Adobe\Acrobat\9.0\Sequences
    XP –
    C:\Documents and Settings\<user name>\Application Data\Adobe\Acrobat\<6.0> or <7.0> or 8.0> or <9.0>\Sequences
    It may be worth a search for all *.sequ files on the HDD to be sure you know where all of them are.
    Sounds like old ones were not removed by uninstall & with re-install, Acrobat is picking them up.
    Be well...

  • Can't batch process opening files with certicate encryption

    Using Acrobat 9.0 pro.
    I am unable to batch proces files that are certicate encrypted.
    When batch processed a dialog message appears that reads;
    Cannot open document
    No files were processed
    I have used the instructions that adobe has for using the associated digital id and ensuring this is logged in.
    And also have set preferences for batch processing  security method to certificate security, no password and, password security.
    FYI: I Don't have livecycle so can't try this.
    Can anyone help with a solution for doing this.
    I was able to create certificate encrypted files using batch processing so can't understand why I now can't open and print file created this way, since
    Acrobat help indicates this can be done.
    Adobe instructions indicate this should work??? What's wrong here.
    Thanks in advance
    Regards,
    smurphy

    I may have to do with the name of the folder, such as having periods or slashes in the folder name.

  • Returns Process - Billing Document with reference to delivery

    Dear All,
    In standard returns process we are creating billing document with reference to sales order.
    How can we make the billing dcoument to be created with refernce to delivery as the business wants the invoice document to be created only when the delivery is posted.
    Kinldy advise what are the configuration settings required.
    With Regards
    Mohammed Raees
    Edited by: Raeesuddin Mohammed on Aug 30, 2011 7:25 PM

    Hi Raees,
    Isnt your process flow like this: Sales Order>Delivery>Billing>Return Order>Return Delivery-->Billing?
    In general, to ensure that you're creating the invoice always w/ref to a delivery document pls do the following:
    1) In VOV8, where you cnofigure your sales doc type remove the order related billing i.e. keep it blank.
    2) In VOV8, put the billing doc in delivery relevant doc.
    3) In VOV8, in shipping section put the delivery doc type.
    4) Create copy controls between the delivery doc type and billing in VTFL at header and item levels.
    5) In the item category for this order type+ item cat grp ensure the billing relevance is either B, C or F.
    6) Maintain no copy controls between sales order and the billing in VTFA.
    I hope this helps.
    Regards,
    Raghu.

  • Optimal workflow for batch processing LR files with Nik plug ins

    I have a series of 40 or so landscape images that I would like to efficiently apply a couple of Nik filters to using Color Efex.  I'd appreciate any suggestions re: the most efficient workflow to accomplish this task in a batch processing approach, as my current approach of taking each image into Photoshop, while preserving Smart Filter benefits, is terribly inefficient.  Thanks in advance.

    Hi,
    Sorry but File->Process Multiple Files is the only way and functionalities with which you can batch process your images in PSE. However you can add action in Window->Action Player and apply to your images opened in workspace -
    http://tv.adobe.com/watch/learn-photoshop-elements-11/adding-actions/
    http://forums.adobe.com/message/4736578
    The functionality is available in full functionality product Photoshop via File->Automate->Batch where you can load actions in action panel and they would appear in this dialog box but this is not available in Elements.
    The best way to do here is to load actions in Window->Action Player and open all your images and click on play button one by one and then use Process Multiple Files to save all these in one go as per your preferences of file type, size, name etc.
    Thanks,
    Garry

  • Input time into Pages document with Automator or Grammarian Pro

    Is there a way (VERY NEWBIE) to have Automator input the time into a Pages document when I press a function key or another key combination? Or can Automator do it with Grammarian Pro? I write all day, and inputing time can get tedious. I have tried all the help files on Automator and have even experimented but to no avail.
    Any help would be appreciated.
    Thanks, Paul

    Do you mean other than using Pages to input the time?
    Did you know about the Insert menu in Pages? In the Insert menu there is an option for "Date & Time…" that will allow you to insert it using various formats, and offers to update it every time the document is opened.
    If you want a keyboard shortcut for a menu item, then open System Preferences and go to the Keyboard & Mouse settings. In there, you can define your own keyboard shortcuts for menu items of a specific application or all applications.
    If a menu item has an ellipsis "..." then you'll likely need to type that as one character. You can either use the system wide Character Palette (often found in the Edit menu as "Special Characters…"), or you can simply type Option-; by holding the Option key and pressing the semicolon key.

  • How to define a Rights Management process "Protect Document" with an watched folder?

    Hello.
    I try to build a process in Workbench 11.0, that uses the Protect Document operation of Rights Management.
    The process should use a watched folder as start point.
    My problem is, how to fill the operations parameters (Input Doc, Document name, Policy set name, Policy name, ...)
    Jürgen

    First -- by default iTunes stores its Library in "My Documents\My Music\iTunes\iTunes Library.itl", and its Music in "My Documents\My Music\iTunes\iTunes Music\".
    Make sure you have a "iTunes Library.itl" after the restore -- if not, and your backup software supports it, try an older version of the file. If your backup software only keeps the last version of the file -- well, then you are SOL, and you will have to re-add the files to the Library. You will also have to rebuild your playlists, ratings, etc.
    Since you have "very few files" in the iTunes Music directory -- either you weren't storing your music there, or your backup didn't work. Are you sure you weren't using a non-default location for your music files?
    If you had a hardware problem then it is likely that your backup stopped working properly at some point. This is why you need a rotating backup scheme and periodic archiving of files to non-writeable media (If you have the time/money)

  • Problem with special characters being randomly inserted into a text document with Surface Pro

    Why are these special characters appearing in the text below?  How do I correct this issue?
    EXAMPLE:  Alice's friends took advantage of her they got all their nai;ls done.
     Her tabl;et is no l;onger working and does not know what happ;ened to it;.
    School: Her grades are falling and so she stop;ped working the program ;with PCC> She is failing all her cl;asses;. She is taking sociology class and he grades really hard. Science cl;ass she took a test and it bro;ught her down. She will have to do better
    on next test to ;;raise ;grade;.; Math cl;ass she will have to make up; a quiz for math—the math is getting harder—geometry is hard for her. Career cho8ices class—he has not p;ut in any grades yet but there is no grade yet. She re;ports that she is ;stubborn
    and she does not ask for help. She is staying after school; for working on her studies;. Grade ;;;;;;;;check wil;l be out next week.
    Therapy: Last f;4riday the therap;ist s;c;hed7led with Alice's bio dad and the therp;iast did not show and was not sure if dad showed because she does not know what dad l;ooks loiike.; They ar3e schedule;ed for this Friday. morning.;

    Hi,
    DId this issue just happened in this text?
    Please open the other text file to check the result.
    I suggest we create a notepad file,and type some words and save it.Then open it again to see the result.
    Meanwhile,as S.Sengupta mentioned,check your input method and Keyboard layout.
    Regards,
    Kelvin Xu
    TechNet Community Support

  • Batch Process File Righrs with Passenger?

    I find myself in an emergency and need to use Passenger to batch create permissions, something I have never done.
    One of my elementary schools had a server crash, I used ditto to copy back all my student user folders to the hard drive but none of their file permissions are correct.
    I am using Passenger version 3.5.4 and have my users folder setup off the root of the Macintosh HD in a folder called Home_Folders. So my directory structure is:
    /Home_Folders/Students/
    I have created a new Permission Set that I have named Students based on the MACOSX default set and edited to fit my directory structure. I have tried both:
    /Home_Folders/Students/<username>
    /Volumes/Macintosh HD/Students/<username>
    And I get the same error messages on both so none of the file rights are changed.
    If anyone is familiar with this function, I would appreciate the help.
    MAC Book Pro/Intel Processor Mac OS X (10.4.8)

    Hi MacWorks,
       I don't have webalizer but I assume from your command that it has no problem with the fact that the logs are gzipped but it simply can't take more than one argument at a time. That kind of situation is one for which xargs was written. Try the following command:
    ls /var/log/httpd/access_log.*.gz | xargs -n 1 ./webalizer -c my.conf
    As you suggested in your post, that has to be run from the directory containing the webalizer executable but xargs will invoke webalizer once for each file which I gather you're saying is all that it can handle.
    Gary
    ~~~~
       A diplomat is man who always remembers a woman's birthday
       but never her age.
             -- Robert Frost

  • Batch processing with a re-save Script

    i have a script that i use to re-save a master file that may or may not have many layers, channels and/or paths.  when i have the master file open, i run the script and it flattens the image, deletes all the channels and paths, and then does a "save as" step saving the file as a tiff with lzw compression.  this all takes place without any user input or dialogs.  the script is copied at the bottom for reference.   i have made an action out of this script and it works fine everytime.  the problem is that when i try to batch process multiple file with this action, it seems that regardless of which options i choose in the batch processing window for saving (e.g. "none", save and close", etc.), the action is interrupted with the usual "save as" dialog window and even though lzw is specified in the script, i also have to manually select this option in the dialog.  does anyone know how to accomplish what i am trying to do (batch "save as" with lzw compression to files that are saved as uncompresseed tiffs) without having to stop for any dialogs?  please help!!!!  thanks.
    johnh h.
    if(documents.length){
    var saveFile = new File(activeDocument.fullName.fsName);
    SaveTIFF(saveFile);
    function SaveTIFF(saveFile){
        tiffSaveOptions = new TiffSaveOptions();
        tiffSaveOptions.embedColorProfile = true;
        tiffSaveOptions.alphaChannels = true;
        tiffSaveOptions.byteOrder = ByteOrder.IBM;
        tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW;
        activeDocument.saveAs(saveFile, tiffSaveOptions, false, Extension.LOWERCASE);
        activeDocument.close();

    hey michael,
    your reply made me curious to try something i hadn't tried before which was to run the "batch" processing from within photoshop and to my surprise it worked.  however if i repeat the exact same thing from within bridge (although in bridge i am selecting multiple files instead of the enclosing folder) it runs into the same problem.  so you have 1/2 solved my problem.  did you actually get it to run properly from bridge (bridge/tools/photoshop/batch) or did you run it from within photoshop itself?  please let me know... i am very curious to detmine the source of the problem.  thanks.  i appreciate the help.

  • Batch processing pictures in iPhoto with Photoshop CS4

    Hello, I am trying to batch process my pictures with photoshop. The only problem is that I can't get a source destination for my pictures. I know how to find them on the hard drive in the iPhoto library but when I try to get to the folder with photoshop it is greyed out. I also have tried selecting the photos though 'media' on the left side of the finder. I can open them but can't use that as the source folder for batch processing. Can someone help me out here? I am getting pretty irritated with iphoto, I am sure there must be some way to do this.
    thanks
    Kris

    Do you have PS set up as the editor of choice in iPhoto like this:
    Using Photoshop (or Photoshop Elements) as Your Editor of Choice in iPhoto.
    1 - select Photoshop as your editor of choice in iPhoto's General Preference Section's under the "Edit photo:" menu.
    2 - double click on the thumbnail in iPhoto to open it in Photoshop. When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done.
    3 - however, if you get the navigation window that indicates that PS wants to save it as a PS formatted file. You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..
    If you want to use both iPhoto's editing mode and PS without having to go back and forth to the Preference pane, once you've selected PS as your editor of choice, reset the Preferences back to "Open in main window". That will let you either edit in iPhoto (double click on the thumbnail) or in PS (Control-click on the thumbnail and seledt "Edit in external editor" in the Contextual menu). This way you get the best of both worlds
    2 - double click on the thumbnail in iPhoto to open it in Photoshop. When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done.
    3 - however, if you get the navigation window that indicates that PS wants to save it as a PS formatted file. You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..
    However, this method will only let you open 4 photos at a time. You can have more than for open but will have to go back to iPhoto select 4 more and open them.
    Otherwise you'll need to export the photos out of iPhoto to a folder and do the batch processing there.

  • Problem w/ Batch Process

    I have been able to convert .pdf files to .tif files by using the Batch Sequence Command "Export All Images As Tiff", but I'm having one issue with the resulting file.  When the original file is a 5 page multi sheet .pdf - the batch process creates 5 single page .tiff documents.  I would like to get 1 multi sheet .tif from every 1 multi sheet .pdf.  I really don't want to have to go that extra step and have to combine the 5 files into 1 multi sheet .tif.  I'm dealing with over 100,000 documents, and that would result into too much time spent.
    Is it possible to create 1 multi sheet .tif from 1 multi sheet .pdf using the batch process feature in Adobe Acrobat Pro v.9?
    Also, while using the above mentioned Command - I'm prompted to hit ok for each file i'm converting.  This really takes away the usefullness of a "batch process"
    Any help with these two issues would be much appreciated.

    Honyk,
    I will look into what you suggested.  I'm not experienced with that much scripting, but i might have to give it a try.
    Thank's for your suggestion,
    Kerry

  • Text jobs with images - printer cancels

    When I print a text document with images the printer stops printing and cancels the print job when it starts to print any image.
    Help
    This question was solved.
    View Solution.

    Hey @sudiegal!
    Thanks for posting on the HP Forums!
    I would be happy to provide some suggestions that may resolve the issue.  I can see that the printer cancels the jobs when you add a photo to you text document.  The first thing I suggest is to remove the printer by resetting the print system.  After the printer is removed re-add the printer and try printing the document again. 
    To reset the printing system:
    1. Click the Apple icon at the top left of the computer
    2. Click System Preferences
    3. Click Printers and Scanners
    4. Hold down the "control" key on the keyboard and click with the mouse in the white space bellow the printer
    5. Click reset printing system dropdown
    6. It may ask for Mac ID and will color wheel for a moment until the printer is removed
    To re-add the printer:
    1. Click the Apple icon at the top left of the computer
    2. Click System Preferences
    3. Click Printers and Scanners
    4. Click the plus (+) icon under the printers list
    5. Select your printer
    6. Choose HP ENVY 7640 series in the dropdown next to "use" or "print using"
    7. Click add
    Please post back and let me know if this works out for you!
    Cbert
    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" at the bottom of this post to say “Thanks” for helping!

  • Batch processing - "Add comments" metadata?

    Greetings,
    Using Acrobat Pro while batch processing Word documents, is it possible to add a comment (all at once, to all the documents being processed) to the "properties" of each document?
    We review documents several times a year. I'd like to add a "review date" to each document's (metadata) "properties". I'd like to do this while batch processing so that the people actually reviewing the documents don't have to open each individual document's properties and add/change the date.
    The review date does not need to be visible on the document itself, but should be in the document's metadata.
    Thank you,
    Tim Kern

    It's possible to convert Word files to PDFs using an Action in Acrobat Pro, and Actions include limited abilities to alter the metadata (though to add a custom value you will need to manually rebuild the XMP data using a JavaScript function).

Maybe you are looking for