Duplicating and incrementing a filename, and the same for text within

I've done some work in AppleScript; not much in Automator. Am curious which might be the better hammer for this:
Given an existing text file:
ZAM001_001ref.mov (note: from job to job, only the "ZAM" portion will change).
... with a mime type of "video/quicktime", with the contents of:
rtsptext rtsp://server.blah.woof/ondemand/zamzam/ZAM_001/mov/ZAM_001001.mov
... I want to create x copies (x depends on the job), incrementing the file name to ZAM001_002ref.mov, etc., and likewise increment the text 001.mov to 002.mov in the file itself (shortened here for brevity).
If the program were speaking, it would say:
Give me the location of the first file.
Tell me how many incremented files you want. Pseudo code maybe something like:
Repeat x times
Duplicate a file in the Finder, incrementing a number in a file name by 1.
Increment a number in the rtsp server/path/file name by 1.
Save the file.
End repeat

This would be tricky (or at the least convoluted) to do in Automator, especially if you wanted to keep to the default actions. Leopard's Automator does have variables, but there are no standard function to do something like increment a number. There are actions to make new text files and to get text from files (and a few to work with an open TextEdit document), but again, no standard functions are available to do something like modify an existing text file. A few Run AppleScript actions would be able to do these things, but you might as well do the whole thing in AppleScript - unless you were wanting to use Automator for something you haven't disclosed.

Similar Messages

  • New form and the code for it..!!!???

    I have created an outlay in forms6i....with the following fields.
    Site name,site id, stc no,MC,district,region
    in this form i have variouss check boxes which are around 15 i.eSDH-MX,DW-DM,SYNC
    and i have got four buttons in this forms like first record,previous record,next record,last record......
    So,when i click first record i want the first record to be displayed, and the same for other 3 buttons also....
    can any1 help me out how shud i proceed with this......i mean what code shud u write for this 4 buttons to work...!!!!

    It seems like this is your first fmb.. :)
    After Creating the datablock for the required table,
    take the property pallete and ensure the fol. properties
    Database Data block: Yes
    Query Allowed : Yes
    Query Data Source Type : Table
    Query Data Source Name : List_of_sites
    Insert Allowed : Yes
    Update Allowed : Yes
    DML Data Target Type : Table
    If all the above properties are set, you will be abe to do DML operations ..
    I hope after saving , you might have got a message in the status bar
    saying Transaction complete: 2 records applied and saved.

  • HT203175 When I try to back up my Iphone, I get a message that My Iphone can not be backed up on my computer.  My computer is authorized and I have been successful with this in the past. I uninstalled Itunes and reinstalled the lastest version and the sam

    When I try to back up my Iphone, I get a message that My Iphone can not be backed up on my computer.  My computer is authorized and I have been successful with this in the past. I uninstalled Itunes and reinstalled the lastest version and the same problem occurs.

    If you are running Tiger, you don't have time machine. 
    You need to get something like SuperDuper! or Carbon Copy Cloner (sorry, I don't have a handy link for CCC but you can Google it to get their site) to make a clone of your drive on the external and then do incremental backups.  The free versions do a lot and you can upgrade to the full-service versions for small change if you need more.  The one time I used SuperDuper! for cloning a volume it worked just fine. 
    (My backup application is the last PPC capable version of Retrospect, which does a credible job, or has over the past ten-twelve years.)

  • HT1349 I can not run the scanner in my main user, but only the second user and the same thing with updating apps! Why is this happening???

    I can not run the scanner in my main user, but only the second user and the same thing with updating apps! Why is this happening???

    Welcome to the Apple Community.
    Enter the details of her second account at system preferences> mail, contacts & calendars.

  • Here.  Hi I buy pack but the problem is you already purchased in-app purchased but it hasn't been downloaded pls fix it for me and I buy before 15 days pack 19,99 and 4,99 and the same problem  in game world strike

    Hi I buy pack but the problem is you already purchased in-app purchased but it hasn't been downloaded pls fix it for me and I buy before 15 days pack 19,99 and 4,99 and the same problem want or were can I fit it pls

    The e-mail for World Strike support is: [email protected]
    You need to contact them with your questions.

  • My macbook pro's screen display has suddenly gone into a strange colour setting where everything appears in a kind of infrared colour palette an I can;t seem to change it back.  It's the same for all icon and websites, does anyone know how to restore?

    My macbook pro's screen display has suddenly gone into a strange colour setting where everything appears in a kind of infrared colour palette an I can;t seem to change it back.  It's the same for all icon and websites, does anyone know how to restore?

    Wow!  I think I had this same issue just last night.
    I was cleaning my macbook pro retina on the outside.  Then I opened it up and was wiping dust off the monitor and I can't pinpoint exactly when, but the colors changed suddenly.  It looked super strange, it was like green halo's and it looked worse when looking at it at an angle.  Of course I took no pictures!!!  I was freaking out that my 2 grand laptop was busted and I somehow removed a protective film or something.
    But I digress...  The image looked very green and spacey, it was almost a neat effect.  After about 5 minutes it started to look a little more digital though.  There were straight lines of this halo effect on the edges and top.  After about 10 minutes it turned into a predominate issue with the blacks on screen.  I could open a web browser and it was unnoticable on a white background.  After about 15 minutes, you could only barely see the green cloud effect if you looked at the monitor from an extreme angle.  After about 20 minutes, it was completely back to normal, I almost feel paranoid like I see a halo or something strange.  But I believe that might be all in my head now.
    So yerp, lemme know what you guys figure out.

  • In outlook 2013 Add-In, Adding dynamic menu to splitButton idMso="DialMenu" is working and the same code is not working in outlook 2010 Add-In.

    In outlook 2013 Add-In, Adding dynamic menu to <splitButton idMso="DialMenu"> is working and the same code is not working in outlook
    2010 Add-In. please let me know, if i am missing something. Below is the xml and screen shot
    <contextMenu idMso="ContextMenuFlaggedContactItem">
     <splitButton idMso="DialMenu">
              <menu>
                <dynamicMenu id="CallContactwithFreedomvoice
    " label="CallContactwithFreedomvoice" 
                            getContent="OnGetContenttest"                           insertAfterMso="Call"/> 
            </menu>       </splitButton>    </contextMenu> 

    Hi Narasimha prasad2,
    Based on the description, the context menu for the flagged contact doen't work in Outlook. I am tring to rerpoduce this issue however failed.
    I suggest that you check the state of the add-in first to see wether the add-in was loaded successfully.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • We have developed a desktop application using Flash software and published the same for MAC environment. When we double click on the index.app file, the application is working perfectly in Mac 10.6.7 at our office. But if the same index.app file is double

    We have developed a desktop application using Flash software and published the same for MAC environment. When we double click on the index.app file, the application is working perfectly in Mac 10.6.7 at our office. But if the same index.app file is double clicked in Mac 10.6.7 at out clients location, its not opening. For your information the client is able to open this same application by double clicking on index.swf file. The main problem is that client is not able to open the application using index.app file at their office whereas we are able to do so at our office. Can anyone give some suggestions to sort this problem?

    The most common reason is different versions of Flash, or different versions of web browsers used.  Some users may elect to not have Flash installed at all because of the processor overhead of Flash.  If you are going to make an application for a client, check what operating system and browser versions they are using first.  Then determine if a stand alone application is required, or if they have the necessary plugins to run specific browser enhanced code.
    P.S. MAC is an acronym for Media Access Control.  Mac is the shorthand for Macintosh, the operating system and computers made by Apple Inc.

  • After I download Itunes, when trying to sync Ipod, message says "needs newer version of mobile support, uninstall Itunes, and reinstall Itunes, and the same process starts all over again. why is that?

    after I download Itunes, when trying to sync Ipod, message says "needs newer version of mobile support, uninstall Itunes, and reinstall Itunes, and the same process starts all over again. why is that?

    Try removing and then reinstalling the Apple software using these instructions.
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    The above containes a link for XP. Also. make sure you install the correct Apple software, It comes in 32 and 64 bit and you need the one that is the same as the computer OS

  • HT3819 Home Share issue: I have a Mac and Apple TV. Both are log into the same Wifi network and the same iTunes account (I can view purchased movies on AppleTV). Home Sharing shows 'ON' for both devices. BUT...AppleTV shows no computers. Itunes sidebar-no

    Has anyone else found solution to Apple devices not 'seeing' each other on Home Share?  I have a Macbook Air (new Nov'12) and Apple TV (new Dec'12). Software updated on both. Both are logged into the same Wifi network and the same iTunes account (I can view movies purchased from iTunes on my AppleTV). Home Sharing shows 'ON' for both devices. BUT...AppleTV shows no computers... and ... Itunes sidebar does not have a 'Shared' area at all.  Help please as without this functionality, my Apple TV only provides portal to purchased (i.e. Netflix,...) content which I can get from Wii or Xbox.
    I have already tried the following without success:
    1. Homeshare DID work the first day after I setup Apple TV... but the next day it has not worked since then.
    2. Powered off 30 sec then re-started (Apple TV & Macbook & iTunes login)
    3. Checked Firewall settings per Home Sharing troubleshooting guide (correct settings)
    4. Turning on Photostream in iPhoto and selecting iPhoto within iTunes and then checking to see if Photostream shows anything on AppleTV (it shows 'on' for my iTunes account but 'Zero' pictures found ... despite the >3,000 pictures showing avail in iTunes).
    I also have 'Remote" app on my iPhone 4, with Home Sharing turned on (same Wifi network)... it has a very similar message as the Apple TV and same result that despite all devices having HomeShare 'on' they cannot see each other:  "Remote will automatically find the iTunes libraries and Apple TVs that have Home Sharing turned on using the account xxxx (it lists my correct itunes account name)."

    I solved this by reset of the Wifi (unplug cable and power to both modem and wifi ... wait 60 sec ... plug in modem cable and power ... plug in wifi power and LAN to modem ... restart AppleTV and Mac ... Turn Home Share 'OFF' in iTunes then back "ON" ... it took ~60 sec for the AppleTV to pick up my Mac in computers.

  • My ipod touch is stuck on the apple logo and after a while a white screen comes up and it restarts and the same thing all over agan. this happened to me before and after a while it turns on but why does it keep on doing this?

    my ipod touch is stuck on the apple logo and after a while a white screen comes up and it restarts and the same thing all over agan. this happened to me before and after a while it turns on but why does it keep on doing this?

    Try connecting the iPod Touch to your computer and restore it.  http://support.apple.com/kb/HT1414

  • Creating a Master virtual hard disk and using the same for all other VM's

    Hi,
    We would like to create a master virtual hard disk and use the same for all other VM's. Can we do that ?
    my requirements :
    1) create 10 VM's
    2) first create a master virtual hard disk with win OS and use the same to create the 10 VM's.
    3) After creating the VM's change the HDD size.
                  -- if i have created master virtual disk with 500GB , and use the same for creating a virtual machine. can we change the HDD size to 1TB ?
    After creating the VM's ,i will change the system names and activate the windows accordingly.
    Will there be any implications ,if we can/will do like this.
    Thanks.

    Hi Suren424,
    I think Using Differencing Disks may cover your needs .
    Please refer to following setps:
       "Create the Parent Virtual Machine Configuration and Virtual Hard Disk
        Install the Operating System, updates, and common software
        Generalize the installation
        Prepare the parent virtual hard disk
        Create the differencing disks
        Create virtual machines that use the differencing disks
    For details please refer to follwing link:
    http://social.technet.microsoft.com/wiki/contents/articles/1393.hyper-v-virtual-machine-vm-parent-child-configuration-using-differencing-disks.aspx
    Hope this helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • I can't make my Apple ID and my primary email one and the same. I've had my Apple ID since the first iPod but now I can't access iCloud because of this.

    Since the introduction of iCloud, I've had this problem with the Apple ID. I've tried to "manage my Apple ID" but clicking the box to "make Apple ID and primary email address one and the same" but it just won't work. I'd given up and just ignored everything iCloud... I've ignored iCloud on my iPad mini and my iPhone 5 and now I'm going to get an iPhone 5s. I'm sure this will be an issue again. FYI, my Apple ID is in the format "a_xyz" only and it's working for purchases and upgrading of iOS, etc just not with iCloud. Any suggestions other than to create a new iCloud account with a different name? Thanks!

    I don't have any suggestions that will help you resolve this issue other than to try posting here where there should be more iCloud experts.
    https://discussions.apple.com/community/icloud/icloud_on_my_ios_device
    Or contact Apple and ask for their help with this. Try here. I think Account and Setup would be the starting point.
    https://getsupport.apple.com/Issues.action

  • HT1473 If I already own a song (from a different album) and the same song is in an album which I want to get, do I still have to pay for the song?

    Other details:
    First album/s- Dookie (Green Day), american idiot (green day)
    and 21st century breakdown (green day)
    Album with same songs in it- international super hits (green day)

    If I already own a song (from a different album) and the same song is in an album which I want to get, do I still have to pay for the song?
    Yes.
    The album which the song has been listed under (on the song's page) is listed in your library under that album. The song is then removed automatically from the first album
    No it's not.
    Purchasing a new song or album will not affect any other song or album in your library.
    In the case of the two albums you mention, if you purchase them both, you will have the same song (different copies) in both albums.

  • I'm attempting to sync several albums from itunes to iphoto.  When select to sync all albums it copies over the previous recorded album.  I tried to sync the Albums individually and the same thing happens.  Any ideas on how to sync my albums?

    I'm attempting to sync several albums from itunes to iphoto.  When select to sync all albums it copies over the previous recorded album.  I tried to sync the Albums individually and the same thing happens.  Any ideas on how to sync my albums?

    Hi NWL1,
    Thanks for the question. If I understand correctly, the iPhone won't update and is stuck. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    Thanks for using Apple Support Communities.
    Have a great day,
    Mario

Maybe you are looking for

  • Ipod as a removable disk

    Hello I am a new user of ipod technologies and I would like to ask you if it is possible to use it as a removable disk because I need to transferd information between my computers? PC   Windows XP  

  • Swapping Entire JVM to Virtual Memory (1.4.2_15 / Windows 2003)

    I am running *3 instances* of Apache Tomcat on Windows 2003 using JVM 1.4.2_15 with the following JVM options: -server -Xmx768m -Xms512m -Xmn256m -Xss128k -verbose:gc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRati

  • Add Standby Server in OEM Grid.

    Hi, I need to add Standby Database in Oracle EM Grid.. it is 11g Emgrid.. Standby database 11.2.0.3 is one server another one server is in 10g.. i need to add both server to EM Grid... We didn't configure Dataguard Broker.. is there any way to config

  • Logic Pro crashes keycommands while session

    Logic 7.2, another mysterious bug. Some of the keycommands crash down while a usual logic-session. For example the "m" for mute. It doesn´t work anymore. If I go to alt-K (for changing keycommands--- it doesn´t work either, so I run the menu), everyt

  • Is it possible to load 4.3.3 on IPAD 2 as of 7/29/11?

    Is it possible to load 4.3.3 on IPAD 2 as of 7/29/11?  I don't have any SHSH blobs.  I don't think it is, but would really like to know if anyone has been able to get this to work.  I am at 4.3.  Many thanks in advance!