| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Can anyone tell me why the second if statement does not work, while the third if statement works.
Property hotfolder: "Data"_______________________________________________
Property errorfolder: "Data:deadfiles:"
Tell application "Finder"
Set flist to every file in folder hotfolder
Repeat with curfile in flist
Set nm to name of curfile as string
(1) If nm contains "id" --- works
Move file (hotfolder & nm) to folder errorfolder with replacing
End if
(2) If characters 6 thru 7 of nm = "id" - doesn't work, no error message, script exits and does not process remaining files in the folder.
Move file (hotfolder & nm) to folder errorfolder with replacing
End if
(3) If characters 6 thru 7 of nm = "gs" - works
Move file (hotfolder & nm) to folder errorfolder with replacing
End if
End tell
| References: | |
| >if statement (From: "Ruby Madraswala" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.