Skip navigation

Help with Applescript - filenames

576 Views 5 Replies Latest reply: May 15, 2013 1:54 PM by marcosfromnull RSS
DK Deadhead Calculating status...
Currently Being Moderated
Feb 25, 2013 2:48 AM

Hi!

 

I hope there is someone who can help me. I have very little experience with Applescript, and have spent a couple of days scouring these forums amongst others without any luck...

 

I have a folder (titled XLS) with about 1000 excel files in it. They are numbered basen on some parametric calculations (1111.xls, 1112.xls, 1113.xls, etc). I have constructed an Automator rutine which, one at a time, can open each excel file, copy some cells and then paste the data into an empty xml-file in TextWrangler. The empty xml-file is also in the XLS folder.

 

What I am looking for is an applescript which can rename the open xml-file with the same filename as the xls-file. So, when 1111.xls is open, the xml-file gets renamed 1111-xml; when 1112.xls is open, the xml-file gets renamed 1112-xml, etc. Each new xlm-file is to be saved into a folder XLM, whivh is also in the XLS folder.

 

Thanks in advance....

 

Rob

MacBook Pro, OS X Mountain Lion (10.8.2), Mac user since 1993
  • pjdube Level 3 Level 3 (830 points)
    Currently Being Moderated
    Mar 3, 2013 6:11 PM (in response to DK Deadhead)

    You don't necessarily need applescript for that. Why don't you tell me what you automator workflow is and then I can help you be able to name these files correctly.

     

    Regards,

     

    Phil

  • marcosfromnull Calculating status...
    Currently Being Moderated
    May 15, 2013 1:30 PM (in response to DK Deadhead)

    Can you share the sample script for this?

     

    Re: Help with Applescript - filenames

     

     

     

    Hi Phil

     

    I solved it with an little AppleScript I found on the net!

     

    Rob

  • marcosfromnull Level 1 Level 1 (0 points)
    Currently Being Moderated
    May 15, 2013 1:54 PM (in response to DK Deadhead)

    Thank you

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.