I’ve got a very sloppy app right now with the code below for cleaning my PSP of mac files, but as it is, I’m GUI scripting it because I don’t understand how to use “do shell script” properly… When I was playing trial and error before I moved onto GUI scripting, I accidentally wiped all 3 volumes on my computer (Start up disk, PSP, EHDD) clean of all mac files listed in the code below so I’m not too keen on giving it any more goes. It did so because I think it was treating each line as it’s own shell so the ‘rm’ stuff ended up running by itself without the directory change. Having said that, how do I go about getting both lines running in the same shell? And on top of that be able to eject the drive when it’s done.
As it is, I can’t quit Terminal, and I can’t eject the drive when it’s done because I’m just using keystrokes so I have no way besides using “delay” to time it correctly… Help please! >.<
Assuming you can help me out, here’s the code without all the excess back slashes and the eject code.
I can honestly say, I haven’t the slightest idea. I pulled that line of code off like macrumors.com or something from some user talking about using it with Drop Script and I’m just applying it to Applescript. I haven’t even scratched the surface of UNIX yet so I know next to nothing.
Heh, yeah it just so happens I grabbed ‘Unix in a nutshell’ from the library awhile back and only recently did I understand the joke on the back, “Suddenly Murray learned that Pablo was only joking when he said that “rm -rf /” was the UNIX command for a directory listing.” I nearly ran it out of curiosity, and boy am I glad I didn’t. That would have sucked! :mad: Although at the same time, I’m not sure it would have worked because I think it would’ve needed to be ~/ specifically to wipe my drive. “rm -rf *” would probably do it too.
If your curious, I think I got the syntax right for the PC equivalent.