[Automator] Using an ls command and then getting the finder items?

So i want to make an automator app that looks for all external hard drives and then ejects them. Unfortunatly to my experimentation you cant use the finder actions to search in the root directory so i simply added a shell script with
ls /Volumes
which works.
then i have a Filter finder items so it doesnt try to eject the Macintosh HD
then i have eject Disk.
The problem lies in that the shell script does not spit out finder items to the filter so the filter throws a warning because it isnt supplied the required data.
My question is, how do i get the shell script to pass down finder items to the filter so everything else runs through smoothly?
EDIT: i have python installed if that helps for simplicity i also know a small bit of C
Thanks
Tom Copcutt

Where did he say that? He only stated that he wanted to avoid ejecting the HD, which isn't possible in any case.
If avoiding .dmg is the issue, one way would be to hard code the possible disk names by using a list like this:
Replace the example volume names with your own volume names inside the curly brackets below;
Names must be quoted and comma separated as shown.
Spaces in names ARE allowed. You can name as many or as few volumes as you wish.
set gDiskList to {"External1 500GB", "Time Machine HD", "External2 HD", "External3 45GB"}
repeat with i in gDiskList
          set i to quoted form of i
      try
                    do shell script "diskutil umount " & i
          end try
end repeat

Similar Messages

  • My various mail boxes now and then gets the Exclamation sign

    Why does the other mail boxes on m Mobile Me account - now and then get the Exclamation Point the the wheel keeps spinning?
    What causes that and how do I fix it?

    You're not alone - I haven't found a reliable solution, and keep hoping it doesn't happen that often.
    I just click on that icon...if that doesn't work, a dialog usually pops up asking if the account should be brought back online. I suspect you've been thru this part tho

  • If I decide to use the monthly membership and then get the hard copy will I still have to pay the monthly fee

    If I purchase the monthly plan for lightroom and then decide to get the hard copy instead will I have to pay for the remaining months still

    If you are in the US there are no carriers who will activate an iPhone for voice only. If you have an iPhone you must have both voice and data plans.

  • Get line that contains and then get the second and fourth line after that.

    So I have a text file and I want it to find all the lines in the file that contain an @ symbol and then I want it to get that line and the line second and fourth from that line. Then I would export it like this:
    $linewith@ + ":" + $secondline + ":" + $fourthline
    Finding the lines with an @ symbol is easy, but how would I tell it to get the second and fourth line after the line with an @ symbol?
    So I would get the lines with something like this:
    foreach ($line in [System.IO.File]::ReadLines($filename)) {
    if($line.contains("@")){}

    That worked perfectly thanks man! Here is the entire code. I'm sure it could been cleaned up. I'm still learning powershell. 
    $username = "Username"
    $password = "Password"
    $url = "http://URL"
    $ie = New-Object -com InternetExplorer.Application
    $ie.visible=$false
    $ie.navigate($url)
    while($ie.ReadyState -ne 4) {start-sleep -m 100}
    $ie.document.getElementById("username").value = "$username"
    $ie.document.getElementById("password").value = "$password"
    $ie.document.getElementById("click").click()
    start-sleep 20
    $ie.Document.body.innertext | Out-File -FilePath c:\web.txt
    $links = $ie.Document.getElementsByTagName('A')
    $logout = $links | where {$_.innerText -eq 'logout'}
    $logout.click()
    start-sleep 5
    (gc C:\web.txt) | ? {$_.trim() -ne ""} | set-content C:\web.txt
    ( Get-Content C:\web.txt | Select-Object -Skip 2 | ForEach-Object { $_.TrimStart( " " ) } ) | Set-Content C:\web.txt
    start-sleep 5
    $fileContents = Get-Content C:\web.txt
    foreach ($line in $fileContents) {
    if ($line -like '*@*') {
    $line + ":" + $($fileContents[$line.ReadCount+0]) + ":" + $($fileContents[$line.ReadCount+3]) | Out-File -FilePath c:\finish.txt -Append

  • When I external edit an aperture photo using Photoshop Elements 9 and then get out, the changes are not reflected in Aperture when I return - this used to work for me but doesn't seem to have for some time - help please?

    Have used Aperture for some time - at some point this stopped working - not sure when
    workflow:
    click photo and elect to use the external editor (Photoshop Elements 9)
    Copy of the photo is created in Aperture with the "O" badge and I am rolled out to Photoshop
    Have to change the type to 8-bit in Photoshop to start making changes
    When done and I exit I am prompted to save the photo
    On returning to Aperture however the "O" badged photo does not get updated/reflect my changes
    Other Things:
    I can find a changed photo sitting in the Aperture Library using finder or Photoshop itself - so I know changes have been made a new file saved (TIFF).
    I am wondering if I am missing some (new) preference such that the changes are not proerly being saved for re-display/storage in the Aperture Library
    I am running Lion OSX at the moment but the behaviour was the same under Snow Lepoard versions.
    Current version of Aperture is 3.1.3, Elements is 9.0
    Any help/suggestions greatfully received

    Try using psd.  Some rerports indicate some confustion between the apps with TIFF.  See:
    https://discussions.apple.com/message/15921933#15921933
    I cannot confirm, nor test, since I use PS CS5, and not Elements.
    Ernie

  • When using firefox to search and then print, the printing is very small. This doesn't happen when using another browzer? Can I fix?

    When visiting different web sites (fidelity, sutter health , etc) from the Firefox browzer and I try and print, the printing always comes out very small like maybe a size 4 or 6. When I use another browzer it comes out normal size. Is there a way I can correct this? Also you should know I'm not real computer smart.
    Thanks for any help you can provide

    Once you set that preference it should hold that setting. You could try 125% but it might clip the right-side of the page.

  • Since upgrading to ios7, apps just say waiting and then get the app cannot be downloaded at this time message. We run a proxy server, devices running ios6 have no problems. Anyone know what the problem is? I think apple just needs to fix its new OS.

    I work at a school running 10 iPads. We connect to the internet through a proxy server. Prior to iOS7 we had no issues, the devices still on iOS6 work perfectly.
    All devices which have been upgraded to iOS7 cannot download apps. I can find the apps in the store, choose to download them, but the icon hangs for a while before returning the "app cannot be downloaded at this time message". Help.

    I have this same exact issue. We have even put all apple servers as not even being filtered by proxy and it still wont download anything. Nor will it let us even log in or create a new acct in the app store. It seems its also not just app store related....as it won't even let you check for IOS updates when a proxy is entered.
    If anyone has any ideas let us know!

  • HT4208 Hi my email says verified and a tick yet I cannot download any apps?  I have entered my apple id and click install and then get the message 'you have not verified your apple id.' Yet when I logged in on my laptop as mentioned it shows verified

    I have requested a verification email to be sent and this has not come through - requested yesterday.

    Have you clicked on the link directly?
    It should say 'Verify Now>'
    Try again.

  • If I have 2 TVs at home and want to buy 2 apple TVs to connect my current TVs, can I use 1 new iPad and then play the movies on the 2 apple TVs at the same time?

    as title...

    iWork is universal, so it will work full-res on the iPad. This is true for any app which has the plus sign symbol (in the App Store in iTunes it will say "This app is designed for iPhone and iPad".
    Matt

  • Is there a way to authenticate an iPad to our WLAN using a digital certificate and then authorize the user in Active Directory?

    We want to authenticate both a device (iPad) to our corporate WLAN, but after authenticating the device we would also like to authentiate the user in Active Directory if possible.  Has anyone had any experience with this?

    You need to make sure that the server sends the "GeoTrust DV SSL CA" intermediate certificate.
    See:
    * http://www.networking4all.com/en/support/tools/site+check/ (www.ucfs.net)
    * https://knowledge.geotrust.com/support/knowledge-base/index?page=content&id=SO9557
    * https://knowledge.geotrust.com/support/knowledge-base/index?page=content&id=AR1422

  • ITS cannot can transform %3D into = and canu00B4t get the Work Item ID

    Hi experts,
    We have an ECC 6.0 EHP3 with a EP 7 (Netweaver 2004s SP18). We use the UWL.
    The issue is when we try to open a taks in the UWL that launch a transaction in the ECC, it can´t open, show this error:
    Transaction SWK1+WI_ID=000000005 is unknown
    This is because in the parameter "DynamicParameter" it pass the value "wi_id%3D000000005004". It can´t resolve "%3D" and change it for "=" so lost the last 3 characteres, try to opens the WI_ID=000000005 instead the WI_ID=000000005004.
    The url is try to open is this:
    http://asvesap002.forcendm.es:50100/irj/servlet/prt/portal/prteventname/navigate/prtroot/pcd!3aportal_content!2fZDiseno!2fZDesktop!2fcom.sap.portal.defaultDesktop!2fframeworkPages!2fcom.sap.portal.frameworkpage!2fcom.sap.portal.innerpage!2fcom.sap.portal.contentarea?NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fevery_user%2Fgeneral%2Fuwl%2Fcom.sap.netweaver.bc.uwl.uwlSapLaunch&System=Memorias&TCode=swk1&UseSPO1=false&AutoStart=true&DynamicParameter=wi_id%3D000000005004&CurrentWindowId=WID1248779358537&NavMode=1
    If i copy this url in a browser and chage %3D for = , DynamicParameter=wi_id=000000005004 , it works fine, open the workitem.
    Here is the code for the task in the uwl xml:
    In the iview "UWL - Launch SAP Transaction", com.sap.netweaver.bc.uwl.uwlSapLaunch, i put the "NO" value for the property "Transaction Supports Unicode Codepages" but the error is still throw.
    Any one can help me?
    Thanks in advance,
    Manuel

    Hello Manuel,
    Please see note 1360904.  Thanks.
    Edgar

  • How can I download Firefox onto a disk from my Windows PC, and then take the disk to my Mac and upload it to use on the Mac? Safari does not work anymore.

    My Mac assures me that I am connected to the internet, using Airport and also ethernet, but Safari never gives me a home page. Can I download Firefox onto a disk using my Windows PC and then take the disk to the Mac and upload Firefox to use on the Mac ?

    You can grab a "full" installer (.dmg file) from this page (scroll down to your preferred language):
    https://www.mozilla.org/firefox/all/

  • SQL help, how to group by column A and then get top frequency of column B?

    Assuming the following table, operation represents each kind of transaction operation
    table operation employee other column c
    '<' id1
    '<' id1
    '<' id2
    '*' id3
    '/' id1
    question, for each operation, which employee do the most? which employee do the 2nd most?
    I thought I need to group by operation first, and then get the frequency of employee, and get the top 1 or top 2 frequency highest.
    But I am stuct, and do not know how to write the sql.

    998408 wrote:
    Assuming the following table, operation represents each kind of transaction operation
    table operation employee other column c
    '<' id1
    '<' id1
    '<' id2
    '*' id3
    '/' id1
    question, for each operation, which employee do the most? which employee do the 2nd most?
    I thought I need to group by operation first, and then get the frequency of employee, and get the top 1 or top 2 frequency highest.
    But I am stuct, and do not know how to write the sql.Welcome to OTN. Ops! posted in wrong forum. Just post in {forum:id=75}. Before posting there close this thread marking as answered.
    If someone's response is helpful or correct, please mark it accordingly.*

  • After hibernation, when trying to login to MacBook Air, it does not accept my password. I have to shut off and then get prompted with the following: Mac OS X wants to use the "login" keychain. I put in the password there and it works. any suggestions?

    after hibernation, when trying to login to MacBook Air, it does not accept my password. I have to shut off and then get prompted with the following: Mac OS X wants to use the "login" keychain. I put in the password there and it works. any suggestions?

    Back up all data.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Select the login keychain from the list on the left side of the Keychain Access window. If your default keychain has a different name, select that.
    If the lock icon in the top left corner of the window shows that the keychain is locked, click to unlock it. You'll be prompted for the keychain password, which is the same as your login password, unless you've changed it.
    Right-click or control-click the login entry in the list. From the menu that pops up, select Change Settings for Keychain "login". In the sheet that opens, uncheck both boxes, if not already unchecked.
    From the menu bar, select
    Keychain Access ▹ Preferences ▹ First Aid
    If the box marked Keep login keychain unlocked is not checked, check it.
    Select
    Keychain Access ▹ Keychain First Aid
    from the menu bar and repair the keychain. Quit Keychain Access.

  • I have been using itunes all day and then it wanted me to install a newer version.  When I did it said I can't because it's missing mdsvr80 or something so i downloaded that now it has another error.  How do I get itunes back the way it was or to work?

    I have been using itunes all day and then it wanted me to install a newer version.  When I did it said I can't because it's missing mdsvr80 or something so i downloaded that now it has another error.  How do I get itunes back the way it was or to work?

    See this User Tip by turingtest2
    https://discussions.apple.com/docs/DOC-6562

Maybe you are looking for