test a range of numbers
test a range of numbers
- Subject: test a range of numbers
- From: danday <email@hidden>
- Date: Wed, 23 Oct 2002 15:25:21 -0500
Is it possible to have an "if" statement test for a range of numbers?
for example
if theFile begins with [1-3] then ...
which would be true for any file that begins with the numbers 1, 2, or
3. I'm working on a script that will move files into folders based on
their names. The file names consist of 8 numbers such as 10236829. The
folders are broken up so files are sorted depending on the first two
digits like this:
00-05
06-09
10-29
30-49
50-99
I can get to work if I have a bunch of if/else like
if theFile begins with 00 then....
else if theFile begins with 01 then...
but I would like to avoid so many if/else statements. Any suggestions?
Thanks,
Dan
_______________________________________________
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.