Re: Disk or Volume path help needed
Re: Disk or Volume path help needed
- Subject: Re: Disk or Volume path help needed
- From: Peter Waibel <email@hidden>
- Date: Wed, 13 Jul 2005 13:12:45 +0200
Hi Robert,
Try this:
set myURL to "smb://ri-fs07.myComp.org/MyShare/"
-- get finder's server volumes --------------------
tell application "Finder"
--get name of every disk
--returns every volume including CDs, HDs
--
set serverVolumeList to name of every disk whose local volume is
false
-- returns server volumes
end tell
--return serverVolumeList
--- set diskList to (do shell script "ls /Volumes")
-- don't use it! It could happen that you get a result like:
-- myshare, myshare 1
-- get volume name from URL ------------------
set prevAppleScriptdelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"/"}
set urlAsList to every text item of myURL
--return urlAsList
set shareName to item 4 of urlAsList
set AppleScript's text item delimiters to prevAppleScriptdelimiters
--return shareName
-- mount, if not yet mounted ------------
if serverVolumeList contains shareName then
--volume available
else
try
mount volume myURL
on error errMsg number errNum
display dialog errMsg
end try
end if
Cheers Peter
Am 13.07.2005 um 00:43 schrieb Robert Kiolbassa:
"smb://ri-fs07.myComp.org/MyShare/"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden