Re: if statement
Re: if statement
- Subject: Re: if statement
- From: Michael Grant <email@hidden>
- Date: Wed, 26 Nov 2003 11:43:23 -0600
On Nov 26, 2003, at 11:03 AM, Ruby Madraswala wrote:
Can anyone tell me why the second if statement does not work, while
the third if statement works.
'characters 6 thru 7' returns a list, not a string. The surprising part
is that the third statement works--are you sure there's not something
else going on?
Michael
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
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >if statement (From: "Ruby Madraswala" <email@hidden>) |