Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > duplicate files of folder...

duplicate files of folder...
Thread Tools
Fresh-Faced Recruit
Join Date: Dec 2002
Status: Offline
Reply With Quote
Oct 21, 2003, 09:02 PM
 
I'm having problem on how to duplicate a list of files
of a folder based on a file name and creation date and I keep getting an error of "Can't make some data to expected type."

I tried:

set fileNameCriteria to "NewsStatic"
set dateCriteria to the (current date) - 7 * days

set htmlFolder to (path to desktop as string) & "Static HTML Folder" as alias
set targetFolder to (path to desktop as string) & "Uploads Static HTML" as alias

tell application "Finder"
duplicate (every file of folder htmlFolder whose ((name starts with the fileNameCriteria) and (creation date is less than the dateCriteria)))
end tell

Any ideas what I'm doing wrong....

thanks...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:18 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2