Yet another Applescript file renaming question...

Hi all,
Well, having been a full-time Applescripter for five years at Apple, I thought it would be easy to dust my chops off and write a simple script to get a file name from one folder and paste that name onto a file in another folder.... but I guess 15 years of no-scripting has proven too much of a challenge to my aging brain... and I am on a time crunch to get this done for my client.
SO, here is what I'm hoping to get help with.  I have no doubt it is pretty simple.
File "A" is in a folder.
File "B" is in a different folder.
I need to GET the name of File A and use it to rename File B.
Can one of you youngin's take 30 seconds and help an old dude out?
Thanks a bunch,
matt

Niel... almost there.
The script works perfectly (with me placing the path instead of just the folder)... thank you so much.
One extra thing though... I didn't realize that the files are different file types (jpg and psd).
So what do I need to do to change the name without changing the file type?
THANKS again!
Matt

Similar Messages

  • Batch file renaming questions

    Beyond knowing that such a facility exists, I have no knowledge about Bridge scripting. Can it be used to modify the standard batch file rename process in Bridge?
    I would like to rename my Canon Raw images with the date (from EXIF Date Digitised) and a sequence number that resets to zero for each new date. This sequence number should accurately reflect the order in which the images were taken (via the time component of EXIF Date Digitised). I would also like to process all files in a subdirectory structure at the same time.
    The standard Bridge batch rename process does not offer a counter that resets for each new date, nor does it seem to allow processing files in more than one folder at a time.
    Can this be done? Do such scripts already exist? Alternatively, are there any commercial software utilities that can do this? I am already aware of a freeware solution called DIM but am a little worried about putting my faith in something with no guaranteed ongoing support - a concern that would be addressed by a script I can control myself or a properly supported commercial solution.

    Hello? Hello? Is there anyone there?
    Have I posted this question in the wrong forum or is everyone on vacation?

  • MoveTo file renaming question

    Hi guys
    If you want to change the case of a file name eg...
    filename.txt
    to...
    FILENAME.txt (using moveTo to do this throws an error, as the file already exists)
    ...is there any way to do it that doesn't involve adding arbitrary characters first, or actually making a copy of the file?  eg...
    filename.txt
    to...
    FILENAME_arbitrary_chars_here.txt
    to...
    FILENAME.txt
    Cheers guys

    I'm not clear on where this is coming from but if you can rename a file, thenwhy not rename it twice, first to change it to something else, then to change it to the desired name.  Another option might be to copy the file data, delete the file, and write the data to a new file with the desired name.

  • Yet Another ASA VPN Licensing Question :)

    I have a pretty good understanding of ASA VPN concepts, but not sure about this scenario.  Two questions regarding 5525 VPN SSL Anyconnect Premium Licensing.
    1.  Assuming we already own a ASA 5525-x with 750 Anyconnect Essentials and Mobile ( p/n ASA5525VPN-EM750K9 ) and want the ability for 200 Clientless (Anyconnect Premium) VPN connections, including mobile devices, what part number do I need?  
    2.  Assuming we do not yet own a ASA5525, but want the same 200 clientless VPN connections plus mobile device connectivity, what part number do I need?   I'm assuming this is correct  >>  ASA5525VPN-PM250K9
    Thanks!

    It's no problem - I sometimes look for an answer to a question myself and find my own 2 year old post explaining the answer. As long as I don't find my 2 week old answer, I'm OK with that. :)
    Anyhow, no there's not a SKU to upgrade Essentials to Premium. All the Premium upgrade SKUs are between Premium licensed user tiers (10-25, 25-50, 50-100 etc.).
    If you're a persuasive customer and make a strong case with your reseller they may be able to get a deal with Cisco outside the normal channels to get some relief as a customer satisfaction issue. That's very much a case by case thing though and not the normal fulfillment method.

  • File renaming question plus shortcut keys

    I do a lot of work with renaming files for an archiving project. I was wondering if anyone knew:
    a.) the shortcut keys to skip to the next word when dealing with a file name with underscores without jumping to the beginning or the end. (i.e. somethingsomethingsomething.something). I know that hold down option while using the arrow keys will jump to the next word separated by spaces, or periods, but not underscores.
    b.) why underscores cause words to be recognized as non-breaking elements? It seems like any non-alpha numeric character should still be read as a break, imo.

    If you didn't also know, you want to navigate back and forth through the finder windows the shortcut for that is: command Left bracket / Command Right bracket Thought you might like to know. I also use the key board a lot in place of the mouse/track pad.
    Message was edited by: gfann18
    Message was edited by: gfann18

  • File renaming question

    I need to add four characters into the middle of numerous filenames.  I have tried Batch Rename in Bridge CS3 but did not have any luck. Tried macros with photoshop, and also can't do it.  The file names would look something like this:  11-100.jpg  and I need it to be 11_VX1-100.jpg. Then the next file name would be maybe 20z-100.jpg and I would need it to be 20z_VX1-100.jpg.  Someone suggest using scripts. I do not know how to use scripts. Can it be done? and How do I do it?  Thanks!

    Here is a script for Bridge that will allow you to do this..
    http://ps-scripts.com/bb/viewtopic.php?t=2366

  • Another Applescript with Excel Question

    Hey Everyone,
    I am making an attempt to write a script for excel. I need the script to do these things:
    Open an excel workbook file from a dialog
    Give me an option to enter a name to search for within that document
    search column D of that document for the name entered
    each time it finds the name in that column, copy that whole row
    copy all of the rows it finds to a new excel workbook
    I have figured out the really basic things(open the file, display the dialog to enter the name in, etc.) I just am not sure how to tell it to search only column D and how to copy the  whole row of each entry it finds.
    Any help offered, I will appreciate!

    MacTech magazine has a tutorial for using Applescript with Office 2008.
    Here is the best I can come up for it. The links to MacTech no longer work. I'm not sure if you can find a way to get to it any more:
    http://gigaom.com/apple/mactech-offers-free-scripting-book-for-office-2008/
    And yes, they are much like macros, without the possibility of malware being embedded.

  • Yet another missing album art question...

    OK, I just received my second 80 GB Apple ipod Classic. The first one was defective out of the box and this (these?) is (are?) my first ipod. I'd heard all the horror stories about itunes and since I have other media players, ripping and tagging utilities I'm happy with, I really have no intention of using itunes for anything more then updating my ipod and manually synching my music.
    I do have one question though. How do I get album art to display for my music? First of all, I unchecked every option in itunes that I could find about updating missing data and downloading album art. I even unchecked the box under My ipod that says "show album art" (maybe mistakenly thinking that was referring to synching album art. All of my mp3's are tagged properly and have the album art, scanned by me from my actual discs embedded in the file in the album art tag. I would think these should display if the ipod is capable of displaying album art, regardless of any checkboxes I've fooled with in itunes but all I get on my ipod are little gray boxes with black musical note symbols in them.
    What did I do wrong? Does anyone have any ideas? Thanks in advance.
    Sicnerely,
    - Byron Followell

    bfollowell wrote:
    I even unchecked the box under My ipod that says "show album art" (maybe mistakenly thinking that was referring to synching album art.
    That's indeed the reason your album art doesn't show on the iPod. Check this box, maybe resync, and the iPod should show the images you embedded in the mp3-files.
    Matko
    Btw, If you scan and add album art yourself a lot, you might want to have a look at this site :
    http://www.albumartexchange.com/

  • Another Large file processing question.

    I have a file that's about 500,000 lines long. I need to comma delimit it. I can't do it in Excel for obvious reason. My last resort is Linux. It contains fixed width columns and I need to put coma between the columns. I know how wide each column is and its position. How can I add comma's to this file in the specific places that I need. Do I need a script. Can I use 'sed'?

    sed or awk may be the tools you want to try for this task. Documentation can be found through the man command or using you're favorite search engine.
    C.

  • Yet another "font not available" question

    Hello,
    First, I'm using FM 8.1.3 on Windows (XP). So I don't have the Font Pod or any of that other FM 10 good stuff.
    I'm trying to open a chapter in a book that contains both English and Simplified Chinese text. The error I keep getting says that "MS Mincho" is not available, and a Kazuka Gothic font is being substituted. I click OK and the file opens. I save and close the file. Then I try to open it again and the error is still there. All of the chapters in the book have the same problem.
    I saved one of the chapters as a .mif and opened that as a text file. I searched for "Mincho", and it wasn't there. I searched for "FFamily" in the file and didn't find anything similar to Mincho in any of the references. There were many entries but no unfamiliar fonts being referenced.
    I also tried the trick of opening all the files, accepting the substitution for each, and then trying to update the book. That doesn't seem to work. The update is finished much too quickly. Something flashes by really quickly in the status bar of the book file - I thought I saw titles of a couple of the chapters (different title each time I ran the update), but (1) the book file does not have a new time stamp, even if I do something that should trigger a change to the book file, eg, change the order of a couple of chapters in the book file, and (2) there's no error message. I don't think it actually did an update. (When I try to update the book with all the chapter files closed, I'm still getting the "could not open file because of missing font" errors.)
    Are there any other things I might try?
    Thanks,
    Joyce

    Joyce,
    You have your preferences set to Remember missing fonts. When you open a file with missing fonts, FrameMaker warns you; but when you click OK, it opens the file with the substituted font just to display the document. FrameMaker does NOT substitute the font permanently, just for the current display. If you make a change and save the file, you are saving any content changes but not the font substitution.
    If you are happy with the substituted font, you can open the preferences and uncheck Remember missing fonts. Then when you open the file, FrameMaker's response is as before; however, when you save the file, the font substitution is saved in the file.
    You can then turn Remember missing fonts back on, if you want. The purpose of this feature is to allow you or others to edit the document without actually having the font on your system but retain the font information in the file.
    Van

  • Yet another rm-1500 related question

    Ive bought sound blaster 24bit external because i needed better sound quality on my laptop. And i was more than happy to get a remote to. But it appears that this little device has shortened my li've by 5 years Whole week i was trying to make it work. I have browsed google for hours. How to turn the device sleep (stand by) off!? Whenever it automaticaly goes to sleep mode, to use it again i have to sit for 2 min and press the buttons on remote rapidly til the thing starts to work. Mainly i've tried to control winamp, so i downloaded rmx, which is by no doubt good plugin. everything works fine except that frustrating stand by mode. Plz help.
    PS all drivers updated.

    sicboy188 wrote:
    basicaly the pc asks for a "network key" which i am assuming is the network password i setup, but this never works.
    What encryption are you using?
    Problems connecting an XP PC to an Airport Base Station
    http://tech.ifelix.net/2002.html
    iFelix

  • Advanced applescript to rename files

    Hi Everybody,
    I am trying to do some applescript to rename files.
    I know some tips to do that, but I try to write an advanced script with many options
    For example : A file to rename :
    "project-test.info.jpg"
    1st :
    I would like the script to find every symbols in the name(without the extension), like here : "-" or "_"
    and repace these symbols with another one like "_"
    then the new name will be :
    "project_test_info.jpg"
    2nd :
    if the file is named in a "wrong way", like :
    test.jpg
    or
    "test-info.jpg"
    or
    "project.test.jpg"
    etc
    then the script will rename in the better way :
    "project_test_information.jpg"
    (information will be data I will enter by myself)
    And many other or examples with all the possibilities to rename...
    I succeed to rename some parts of the name, but I don't find the solution to replace symbols, and how to count the number of text parts and replace the good ones...
    I dont know even if it's a good way to do like that in fact, an maybe it's possible in another way ?
    Thank you very much for your answers !

    Hi Everybody,
    I am trying to do some applescript to rename files.
    I know some tips to do that, but I try to write an advanced script with many options
    For example : A file to rename :
    "project-test.info.jpg"
    1st :
    I would like the script to find every symbols in the name(without the extension), like here : "-" or "_"
    and repace these symbols with another one like "_"
    then the new name will be :
    "project_test_info.jpg"
    2nd :
    if the file is named in a "wrong way", like :
    test.jpg
    or
    "test-info.jpg"
    or
    "project.test.jpg"
    etc
    then the script will rename in the better way :
    "project_test_information.jpg"
    (information will be data I will enter by myself)
    And many other or examples with all the possibilities to rename...
    I succeed to rename some parts of the name, but I don't find the solution to replace symbols, and how to count the number of text parts and replace the good ones...
    I dont know even if it's a good way to do like that in fact, an maybe it's possible in another way ?
    Thank you very much for your answers !

  • File management questions with iPhoto 8

    I am new to iPhoto, not just version 8. I need to understand a few basics about the Apple way of handling photos. First off let me say that I have a MacBook Pro and a Windows XP desktop pc. I just set up an external harddrive as my storage space for my photos. They were on my pc, but I want to take advantage of iPhoto and manage them via my mac laptop. So I formatted the external drive as a mac drive, purchased a copy of MacDrive so that my pc can read/write to this drive as well and transferred all of my photos to the external harddrive. 14 gigs. I suppose I should now delete them off my pc...
    Before I moved my photos, I organized them all into appropriate folders, consolidating them and removing any duplicates that occured sometimes when I accidentally re-imported the same photos from my camera.
    I imported the photos on my external harddrive into iPhoto's photo library, using the alias approach instead of having iPhoto make copies of the photos. (I don't need to waste yet another 14 gigs!) So now I have numerous Events, most of which relate directly to the folders I created for my photos. I noticed however that in some instances, iPhoto created multiple events for photos within the same folder.
    Here are my questions...
    If I merge events in iPhoto, I noticed my folders do not change. Am I just messing around with the aliases, sorta like creating playlists in iTunes? Is there any way to keep things in sync between my folders and my events, so that the contents of my folders match the contents of my events, or is this unwise or unnecessary?
    If after I have imported my photos into iPhoto, what happens when I merge my folders of photos on my harddrive, outside of iPhoto? Does iPhoto keep up or do I have to somehow update my iPhoto library? Refresh it? What happens when I add more photos, say with my pc? Do I have to import the new folders of photos into iPhoto each time?
    I also have a question about keywords. From the demo movie I watched on apple.com, I saw that one can search for photos using keywords. In the demo, the presenter typed the name of a person and all the pictures of that person appeared. If I want to do this, does this mean I have to add for example the keyword "David" to every picture David is in? Can the name simply appear in the title for the photo and still get picked up within the search results? Is there an easy way to assign keywords to multiple photos at the same time?
    Thanks for helping me start out on the right foot!
    Paul

    Dani:
    You don't have to duplicate photos when using iPhoto in it normal, copy to library, mode. Once you import the files you can delete the ones used to import. However, if you're a professional then you've probably read the DAM book, Digital Asset Management, and it implies multiple backup copies.
    Files imported in the alias mode retain the color profile that was added by the camera. If you edit in iPhoto then the resulting modified will will have a default profile. In my case the profile went from sRGB IEC1966-2.1 to Camera RGB Profile. But if you use Photoshop as your editor of choice in iPhoto you can manage the profile with it.
    I like iPhoto 7 much more than 6. It's editing capabilities are much improved but still no match for PS. It also writes the metadata, comments, keywords and title to the file when exporting. It also allows you to modify the EXIF Capture Date and write it to the original file.
    As with any application you must have backups and backups. Also always keep a minimum of 10 GB free space, 15 or more if you'll be doing some heavy editing with PS or work with video. That's important. So that means an external FW hard drive or two for redundancy backups. That is if you're serious about it.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • File rename doesn't add leading zeros to renaming files sequence? And a pat on the back to the LR de

    First of all, LR truly rocks. Any Adobe folk reading this, please take this note as a massive pat on the back for your team. There's a lot of childish and naive negativity from people posting in this forum. And I suspect from folk who are not really your key market for this app. I feed my kids by running a photography business and have been shooting digital since the early 90s...ya know...
    LR will be looked at as a massive sea change in the development of digital photography. The first time the entire workflow process is truly viable from end to end. What will make LR the ultimate winner in it's field is simply the integration with Photoshop. Aperture, Capture One etc cannot ever beat LR regarding this and so, just like the way that Excel and Word and Powerpoint all work together and everyone uses them, LR will inevitably become the de facto standard way of managing RAW images for pro photographers.
    Even with the few bugs (specifically file movingon Mac OS10.4.9) LR has shaved HOURS off our workflow. We shoot around 250 gigs of images a month in our weddings and event business. Now all of our editors use LR. No more Capture One etc for us.
    Here's the question - There seems to be no way to add leading zeros to a file rename command. So if you rename a batch of images they appear as 1,2,3,4,5,6,7,8,9,10,11,12 etc so now when I look at them in Bridge or other apps, they are now sorted 1,10,11, etc
    Now let me tell ya this is a pain.
    Any comments or comfort that is is a known issue would be appreciated. All we want is a way to have the rename add the leading zeros like most other apps do...
    Best to all
    William Henshall
    www.californiaweddingphotos.com
    PS By the way, I am a HARD *** about shoddy unstable software sold to pro photographers as the "prefect solution" that doesnt work as advertised...I am that guy that the tech support guys at certain companies dread. Yep, I simply expect an app to do what it says, just like the car I buy. I once resorted to sending the CEO of a certain software company an invoice for my time restarting, reinstalling the OS and bug finding another similar app. You can image, I got a personal call...heh...

    William-
    <br />
    <br />I just changed a folder of 85 images' names, and typed in 001 as my starting number. While no zeroes were prepended, the pix show up in order both in the Finder and in Bridge CS3.
    <br />
    <br />Say a bit more about file moving on your Macs.....
    <br />
    <br />
    <span style="color: rgb(102, 0, 204);">John "McPhotoman"</span>
    <font br="" /></font> color="#800000" size="2"&gt;~~ John McWilliams
    <br />
    <br />
    <br />
    <br />MacBookPro 2 Ghz Intel Core Duo, G-5 Dual 1.8;
    <br />Canon DSLRs

  • File path question....

    Yet another really simple question from me, as I've been away from DIAdem for too long.
    I have a program which, in part of it, needs the user to select the path that they want a set of a few hundred files to be saved in. I've tried using FileNameGet, but this requires me to select a file in the directory i want to save into to record the path. I just want the user to have to select the folder once.
    I've tried this:
    '===============
    dim newfilepath
    If  (FileNameGet("ANY",,,,,,"Select the directory to save the new files into:") = "IDOk") Then
      newfilepath=FileDlgDir
    else
    End If
    '===============
    Can I select a directory instead of a file?
    Solved!
    Go to Solution.

    Hello Tom!
    Yes, with the PathNameGet() command.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

Maybe you are looking for