Mailing Lists: Apple Mailing Lists

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

Script errors with empty file reference




Hi all,

I have a collect-for-output script which has been working fine until a user reported to me today constant errors all day when checking her job folders prior to archiving.

The script errors on a handler which duplicates a list of "missing" files (Sources) to the job's local Images folder (destination).

on moveItems(Sources, destination)
        log Sources
        tell application "Finder"
                repeat with ThisBit in Sources
                        log ThisBit
                        duplicate ThisBit to destination with replacing
                end repeat
        end tell
end moveItems

The error message in the log refers to the file as "". Here's the end part of the log:

(*alias RESOURCES:FOX RESOURCES: • BASE ARTS:SLICKS/GENERIC:TCFHE:TCFHE DVD SLICKS:EPS Files:DVD LOGO WHITE.eps*)
                current application
                "Finder got an error: The operation could not be completed because the file “” is in use."

I'm not sure why "current application" is in there (it doesn't show after any of the other files are processed in the repeat). In the full log I can see that there are numerous files which are successfully logged and moved but I noticed, after processing a few different job folders, that it chokes after logging the specific file "DVD LOGO WHITE.eps" If I run the script again on the same job folder the script completes without error.

This eps file (256K in size) happens to be placed in the Quark file 3 times so I thought perhaps the script was choking trying to move it a second or third time and it was already busy moving it the first or second time (hence the error that it is in use) but why refer to it as file "" and why always work correctly the second time?

Any thoughts?

Cheers
 _______________________________________________
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
Archives: http://lists.apple.com/archives/applescript-users

This email sent to 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.