Re: Volume status
Re: Volume status
- Subject: Re: Volume status
- From: Mr Tea <email@hidden>
- Date: Fri, 01 Oct 2004 16:39:47 +0100
This from Jakub Formanek - dated 1/10/04 11ยท12 am:
> How can I get info about mounted volume/disk is writable or read-only?
As an alternative to my previous suggestion, you could always try a more
direct approach to test if a volume/disk can be written to:
--=======================================
tell application "Finder"
activate
choose folder with prompt "Select a volume
to check:" default location ":Volumes:" as alias returning dsk
end tell
set filePath to "" & dsk & "test.txt"
set psxPath to quoted form of POSIX path of filePath
try
set f to open for access file filePath with write permission
close access f
do shell script "rm " & psxPath
tell application "Finder" to display dialog "Can write to this disk"
on error
try
close access f
end try
tell application "Finder" to display dialog "Can't write to this disk"
end try
--=======================================
HTH,
Nick
pp Mr Tea
--
_______________________________________________
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