• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Creating folders (directories) without the Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating folders (directories) without the Finder


  • Subject: Re: Creating folders (directories) without the Finder
  • From: "Arthur J Knapp" <email@hidden>
  • Date: Thu, 22 Mar 2001 11:20:09 -0500

> From: email@hidden
> Date: Thu, 22 Mar 2001 00:41:17 EST
> Subject: Re: Re: Creating folders (directories) without the Finder

> ... I had a venerable but
> occasionally unpredictable plain vanilla handler trio that has performed that
> task for me, but I discovered Akua has the very wonderful "verify path"
> command.

> verify path "HD:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z"

> Blazing fast (over 1000 folders a second in more detailed tests), one line of
> code rather than 24, and I should expect, rock solid stable. Exactly what I
> need. Thanks a bunch!


Good stuff. :)


If these paths are just strings, there is another non-Finder method
you could use. I haven't speed tested it, but no scripting additions
are required:

on verifyPath( pathString )
try
alias pathString
on error

return false
end try
return true

end verifyPath



This second handler is just an example of how you can extract
more information about the existence/non-existence of the path:

on verifyPath( pathString )
try
alias pathString

on error errmsg number errnum

if errnum = -35 then
return "disk does not exist"

else if errnum = -120 then
return "a folder does not exist"

else if errnum = -43 then
return "the file does not exist"

else
error errmsg number errnum
end if
end try

return "exists"

end verifyPath


Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden

Hey, check out:
http://home.earthlink.net/~eagrant/


  • Prev by Date: Re: short & sweet script: delete to end
  • Next by Date: Re: Creating folders (directories) without the Finder
  • Previous by thread: Re: Creating folders (directories) without the Finder
  • Next by thread: Re: Creating folders (directories) without the Finder
  • Index(es):
    • Date
    • Thread