Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need to process all files in folder with Applescript and Excel




On 21-Sep-06, at 10:41 AM, R M wrote:

However, the AppleScript as written will only convert one file at a time. I
need a way to have this script loop through the specified directory, choose
each successive file, convert it, save it, and then go back to the next file
in line in the same folder. I'm sure it is a simple fix, but I can't find
any reference or example to help me chunk through this directory one file at
a time. I've been scouring for reference for this but just can't fnd example
syntax.

Untested: --------------- set the_folder to "Users:mynameesktop:TESTfolder:" set the_folder_list to list folder the_folder without invisibles repeat with x from 1 to count of the_folder_list set the_file to the_folder & item x of the_folder_list set the_new_file to the_folder & the_file & "_new.html" tell application "Microsoft Excel" activate open the_file save active workbook in the_new_file as HTML close active workbook without saving end tell end repeat ----------------


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden
References: 
 >Need to process all files in folder with Applescript and Excel (From: R M <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.