Eject USB Disk

I recently got a large quantity of old floppy disks to sort through and pull anything useful off of. I've already got the workflow working properly except for ejecting the disk. Since each disk is unknown, I can't code in the name of the disk, nor do I want to interact with the workflow by picking from a list of disks to eject.
My current attempt is to run a shell script when the workflow finishes, but it seems to always pass the argument to the script even without me using it in the script. My script is very simple.
The error I get is "Error Processing file on the file Floppy Disk". The steps before the script copy the files, then rename the folder, so it's obviously passing the path to the newly renamed file to the script.
How can I tell the script to just eject the disk regardless of its name and ignore any arguments passed in?
My current attempt is to run a shell script when the workflow finishes, but it seems to always pass the argument to the script even without me using it in the script. My script is very simple.
- Code: Select all
diskutil unmount /dev/disk2
The error I get is "Error Processing file on the file Floppy Disk". The steps before the script copy the files, then rename the folder, so it's obviously passing the path to the newly renamed file to the script.
How can I tell the script to just eject the disk regardless of its name and ignore any arguments passed in?