Thanks Mark, for your answer, but you did not bring me the solution :
To further clarify the situation, my configuration is :
PowerMac G4 733 MHz named "G4733" or "G4733.local" with 3 physical disks, 2 of them with several partitions :
"G4733-X", "G4733-W" (startup disk) and "G4733-9" on disk #1 (SCSI)
"G4733-ATA1" thru "GA733-ATA6" on disk #2 (ATA) 6 partitions
"G4733-Q2" with only one partition (SCSI)
Powerbook G3 400 MHz named "PB-G3400" or "PB-G3400.local" with a single disk "G3400-X" in one partition.
Ethernet link between the 2 computers thru a 100Mbps switch.
Both computer under Mac OS X 10.4.2
All commands issued from the PowerMac G4,
"G4733-W" is the startup disk.
tell application "Finder"
if not (exists disk "G3400-X") then
mount volume "afp://PB-G3400.local/G3400-X/" as user name "Jacques" with password "abcdefg" -- THIS WORKS : the G3400-X icon appears on the desktop delay 3
eject disk "G3400-X" -- THIS WORKS : the G3400-X icon disappears from the desktop
end tell
But it does not work with the others disks of the G4
What are you trying to do with the above?
All the G4 disks are automatically mounted at startup, but can be dismounted (with Disk Utility for example)
I was trying unsuccessfully, to guess the correct syntax (or reference) to mount a dismounted disk ("G4733-ATA5")
it looks like you're trying to mount an already-mounted volume,
No I was not !...
and you're referring to it in a way that won't work whether it's mounted or not.
OK, but WHAT WOULD YOU WRITE to mount and then dismount "G4733-ATA5" or "G4733-9" or "G4733-Q2" ?
If the disk is already mounted, then you don't want to "mount" it. In the usual UNIX terminology, you want to "unmount" it (why we use that when the usual English opposite for "mount" is "dismount" is anyone's guess), and the UNIX command to do it is "umount" (guess the first "n" made it too long to type). However, there is no "unmount volume" in AppleScript; the corresponding idiom from the Mac side of the house is "eject"ing, by analogy with floppies and CDs.
Sorry, but I already knew all that ...
If you're talking about hard disk partitions, using the UNIX commands mount and umount via "do shell script" is probably the *easiest* way to script things;
I agree with you, but I would like to know the proper way to do it without UNIX if and when it is possible.
and the argument for "eject disk" has to be whatever name shows up in the output of the "list disks" command.
list disks gives :
{"G4733-W", "G4733-Q2", "G4733-ATA1", "G4733-X", "G4733-ATA2", "G4733-9", "G4733-ATA3", "G4733-ATA4", "G4733-ATA5", "G4733-ATA6","eDrive", "Network", "G3400-X"} when all the disks are mounted
tell application "Finder"
eject disk "G4733-ATA5" -- DOES NOT WORK, nothing happens, no message, the G4733-ATA5 icon remains on the desktop
end tell
What should be written ?