+ Reply to Thread
Results 1 to 5 of 5

Using excel to batch rename files + applescript

  1. #1
    Registered User
    Join Date
    08-08-2012
    Location
    minneapolis
    MS-Off Ver
    Excel 2011
    Posts
    12

    Using excel to batch rename files + applescript

    What I'd like to do:

    Column A = Old name (file names extracted from folder on desktop-this folder includes 700 photos in ascending order. 001-700.jpg)
    Column B = New name (these values I have in a list and will just copy them and paste)

    I'd like to do this rename in applescript, but I don't know how to get the new names out of excel (in xlsx or csv?) and apply them to the corresponding old name. Any help would be appreciated.

    If there is a better way to do this than the above, I'm open to anything. Thanks!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using excel to batch rename files + applescript

    You might post the Applescript question over in an Applescript forum.


    As for Excel... you can use VBA to rename files listed in one column to names listed in another column. You'll have to edit this, of course, but once you've entered the correct path to your pictures, this macro will rename column A filenames with the column B new names. Any filenames not found will be colored to draw your attention:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-08-2012
    Location
    minneapolis
    MS-Off Ver
    Excel 2011
    Posts
    12

    Re: Using excel to batch rename files + applescript

    Thank you!

    It's not working, though. Could it be that I'm on MS 2011 running Mac OSX?

    I'm getting an error in line 4.

    Please Login or Register  to view this content.
    Last edited by bobbybill; 09-15-2012 at 09:03 AM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using excel to batch rename files + applescript

    Yeah, I'm no Mac guy. You'll might have to replace that line of code with one that sets the path to the folder exactly.

    A little Googling suggests this gives you the path of the desktop on a Mac:
    Please Login or Register  to view this content.
    So maybe:
    Please Login or Register  to view this content.
    And I don't know of the Windows "NAME" command that follows will work on Mac.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using excel to batch rename files + applescript


  6. #6
    Registered User
    Join Date
    07-22-2014
    Location
    INDIA
    MS-Off Ver
    MS office 2007
    Posts
    0

    Re: Using excel to batch rename files + applescript

    The best way to batch rename files I suggest to try KrojamSoft BatchRenameFiles program.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1